:root {
  --bg: #0b0b0c;
  --surface: #121214;
  --surface-2: #19191c;
  --line: #26262b;
  --line-soft: #1b1b1f;
  --text: #ecebe6;
  --muted: #8f8f96;
  --faint: #5f5f66;
  --accent: #c4a64d;
  --accent-soft: rgba(196, 166, 77, 0.14);
  --up: #62b48c;
  --down: #d4655f;
  --up-soft: rgba(98, 180, 140, 0.12);
  --down-soft: rgba(212, 101, 95, 0.12);
  --radius: 8px;
  --font: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --max: 1320px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 15px/1.5 var(--font);
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; width: 100%; max-width: var(--max); margin: 0 auto; padding: 28px 24px 56px; outline: none; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, p { margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: #111; padding: 8px 12px; border-radius: var(--radius); z-index: 100; }
.skip:focus { left: 8px; }
.num { font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.mono { font-family: var(--mono); }
.up { color: var(--up); }
.down { color: var(--down); }
.muted { color: var(--muted); }

/* navegação */
.nav { position: sticky; top: 0; z-index: 40; background: rgba(11, 11, 12, 0.92); border-bottom: 1px solid var(--line); backdrop-filter: blur(8px); }
.nav__in { max-width: var(--max); margin: 0 auto; padding: 0 24px; height: 60px; display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: -0.02em; font-size: 17px; }
.brand__mark { width: 12px; height: 12px; background: var(--accent); transform: rotate(45deg); border-radius: 2px; }
.tabs { display: flex; gap: 4px; flex: 1; }
.tabs a { padding: 8px 14px; border-radius: var(--radius); color: var(--muted); font-weight: 500; position: relative; transition: color 0.2s, background 0.2s; }
.tabs a:hover { color: var(--text); background: var(--surface); }
.tabs a[aria-current="page"] { color: var(--text); }
.tabs a[aria-current="page"]::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: -13px; height: 2px; background: var(--accent); }
.status { font-size: 13px; color: var(--muted); white-space: nowrap; }
.status[data-state="live"]::before, .status[data-state="cache"]::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 8px; background: var(--up); }
.status[data-state="cache"]::before { background: var(--accent); }

/* cabeçalho de página */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; margin-bottom: 24px; }
.page-head h1 { font-size: 30px; font-weight: 600; letter-spacing: -0.03em; line-height: 1.1; }
.page-head p { color: var(--muted); margin-top: 6px; max-width: 62ch; }

/* painel de métricas */
.stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); margin-bottom: 28px; }
.stat { padding: 18px 20px; border-right: 1px solid var(--line); min-width: 0; }
.stat:last-child { border-right: 0; }
.stat__label { font-size: 13px; color: var(--muted); }
.stat__value { font-size: 22px; font-weight: 500; margin-top: 4px; white-space: nowrap; }
.stat__sub { font-size: 13px; margin-top: 2px; color: var(--muted); }
.gauge { display: block; width: 100%; max-width: 150px; height: auto; margin-top: 2px; }

/* painéis */
.panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); min-width: 0; }
.panel__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 16px 20px 0; }
.panel__head h2 { font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }
.panel__head span { font-size: 13px; color: var(--muted); }
.panel__body { padding: 8px 20px 18px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 28px; }
.grid-main { display: grid; grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr); gap: 20px; margin-bottom: 28px; }
.stack { display: flex; flex-direction: column; gap: 20px; }

/* listas de sinais */
.signal-list { list-style: none; margin: 0; padding: 0; }
.signal-list li { border-top: 1px solid var(--line-soft); }
.signal-list li:first-child { border-top: 0; }
.signal-list a { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto 52px; gap: 12px; align-items: center; padding: 11px 0; transition: background 0.2s; }
.signal-list a:hover .sig-name { text-decoration: underline; text-decoration-color: var(--faint); text-underline-offset: 3px; }
.sig-name { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sig-name small { color: var(--muted); font-weight: 400; margin-left: 6px; }
.sig-price { text-align: right; font-size: 14px; }
.sig-price small { display: block; font-size: 12px; }
.score { font-family: var(--mono); font-size: 15px; font-weight: 500; text-align: right; }
.coin-img { width: 28px; height: 28px; border-radius: 50%; background: var(--surface-2); object-fit: cover; }
.mono-tile { width: 28px; height: 28px; border-radius: var(--radius); background: var(--surface-2); color: var(--muted); display: grid; place-items: center; font-size: 11px; font-weight: 600; flex: none; }

/* chips */
.chip { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 500; border: 1px solid var(--line); color: var(--muted); }
.chip--buy { color: var(--up); background: var(--up-soft); border-color: transparent; }
.chip--sell { color: var(--down); background: var(--down-soft); border-color: transparent; }
.chip--hold { color: var(--accent); background: var(--accent-soft); border-color: transparent; }

/* ferramentas da tabela */
.toolbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.search { flex: 1 1 240px; max-width: 360px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 9px 12px; }
.search::placeholder { color: var(--faint); }
.search:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.seg button { background: none; border: 0; padding: 8px 14px; color: var(--muted); font-weight: 500; font-size: 14px; transition: color 0.2s, background 0.2s; }
.seg button + button { border-left: 1px solid var(--line); }
.seg button:hover { color: var(--text); }
.seg button[aria-pressed="true"] { background: var(--surface-2); color: var(--text); box-shadow: inset 0 -2px 0 var(--accent); }
select.sel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 12px; }
.btn { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 14px; font-weight: 500; transition: border-color 0.2s, transform 0.15s; }
.btn:hover { border-color: var(--faint); }
.btn:active { transform: translateY(1px); }
.btn--accent { border-color: var(--accent); color: var(--accent); }

/* tabela */
.table-wrap { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 880px; }
th, td { padding: 12px 9px; text-align: right; white-space: nowrap; border-bottom: 1px solid var(--line-soft); }
th:first-child, td:first-child { padding-left: 16px; }
th:last-child, td:last-child { padding-right: 16px; }
tr:last-child td { border-bottom: 0; }
th { font-size: 13px; font-weight: 500; color: var(--muted); background: var(--surface); position: sticky; top: 0; user-select: none; }
th button { background: none; border: 0; padding: 0; color: inherit; font-weight: inherit; }
th button:hover { color: var(--text); }
th[aria-sort="ascending"] button::after { content: " \25B2"; font-size: 9px; color: var(--accent); }
th[aria-sort="descending"] button::after { content: " \25BC"; font-size: 9px; color: var(--accent); }
th.l, td.l { text-align: left; }
tbody tr { cursor: pointer; transition: background 0.15s; }
tbody tr:hover { background: var(--surface-2); }
tbody tr:focus-visible { outline-offset: -2px; }
.cell-name { display: flex; align-items: center; gap: 10px; }
.cell-name b { font-weight: 500; display: inline-block; max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
.cell-name small { color: var(--muted); margin-left: 6px; font-size: 13px; }
td.rank { color: var(--faint); width: 44px; }
.spark { display: block; width: 92px; height: 30px; margin-left: auto; }
td.l:last-child, th.l:last-child { text-align: left; }
.empty { padding: 36px 20px; text-align: center; color: var(--muted); }
.more { display: flex; justify-content: center; margin-top: 16px; }

/* detalhe */
.crumb { font-size: 14px; color: var(--muted); margin-bottom: 14px; display: inline-block; }
.crumb:hover { color: var(--text); }
.detail-head { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 22px; }
.detail-id { display: flex; align-items: center; gap: 14px; }
.detail-id img, .detail-id .mono-tile { width: 44px; height: 44px; font-size: 14px; }
.detail-id h1 { font-size: 28px; font-weight: 600; letter-spacing: -0.03em; line-height: 1.1; }
.detail-id h1 small { color: var(--muted); font-weight: 400; font-size: 18px; margin-left: 8px; }
.detail-price { text-align: right; }
.detail-price .big { font-size: 34px; font-weight: 500; line-height: 1.1; }
.detail-price .chg { font-size: 15px; margin-top: 4px; }
.chart-tools { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px 20px 0; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--muted); align-items: center; }
.legend label { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; }
.legend input { accent-color: var(--accent); margin: 0; }
.key { display: inline-block; width: 14px; height: 0; border-top: 2px solid var(--text); }
.key--sma20 { border-color: var(--accent); }
.key--sma50 { border-top: 2px dashed var(--muted); }
.key--fc { border-color: var(--accent); border-top-style: dotted; }
.chart { position: relative; padding: 6px 12px 14px; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .grid line { stroke: var(--line-soft); }
.chart .axis text { fill: var(--faint); font: 11px var(--mono); }
.chart .tip { position: absolute; pointer-events: none; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 10px; font-size: 12.5px; line-height: 1.45; min-width: 130px; opacity: 0; transition: opacity 0.12s; z-index: 5; }
.chart .tip b { display: block; font-weight: 500; margin-bottom: 2px; }
.draw { stroke-dasharray: var(--len, 4000); stroke-dashoffset: var(--len, 4000); animation: draw 1.4s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

.verdict { display: flex; align-items: center; gap: 18px; padding: 18px 20px; }
.verdict__score { font-size: 44px; font-weight: 500; line-height: 1; }
.verdict__score small { font-size: 15px; color: var(--muted); }
.verdict p { color: var(--muted); font-size: 14px; margin-top: 6px; }
.factors { list-style: none; margin: 0; padding: 0 20px 18px; }
.factors li { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 10px 0; border-top: 1px solid var(--line-soft); font-size: 14px; }
.factors li span:first-child { color: var(--muted); }
.factors li small { grid-column: 1 / -1; color: var(--faint); font-size: 12.5px; }

.scale { position: relative; height: 8px; border-radius: 4px; margin: 10px 0 6px; background: linear-gradient(90deg, var(--up) 0 30%, var(--line) 30% 70%, var(--down) 70% 100%); opacity: 0.85; }
.scale i { position: absolute; top: -4px; width: 3px; height: 16px; background: var(--text); border-radius: 2px; transform: translateX(-50%); }
.scale-labels { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--faint); font-family: var(--mono); }

.kv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; padding: 6px 20px 18px; }
.kv > div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line-soft); font-size: 14px; }
.kv > div span:first-child { color: var(--muted); }

.scen { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--line-soft); }
.scen > div { padding: 14px 20px; border-right: 1px solid var(--line-soft); }
.scen > div:last-child { border-right: 0; }
.scen small { color: var(--muted); font-size: 13px; display: block; }
.scen b { font-weight: 500; font-size: 18px; display: block; margin-top: 2px; }
.scen em { font-style: normal; font-size: 13px; }
.note { font-size: 13px; color: var(--faint); padding: 0 20px 16px; max-width: 80ch; }

/* comunidade */
.banner { border: 1px solid var(--accent); background: var(--accent-soft); border-radius: var(--radius); padding: 12px 16px; margin-bottom: 22px; font-size: 14px; }
.trader { display: grid; grid-template-columns: 40px 48px minmax(0, 1.4fr) repeat(3, minmax(70px, 0.6fr)) 120px; gap: 14px; align-items: center; padding: 14px 20px; border-top: 1px solid var(--line-soft); }
.trader:first-child { border-top: 0; }
.trader .pos { color: var(--faint); font-size: 14px; }
.trader .who b { font-weight: 500; display: block; }
.trader .who small { color: var(--muted); font-size: 13px; }
.trader .m { text-align: right; }
.trader .m small { display: block; color: var(--muted); font-size: 12px; font-family: var(--font); }
.trader-head { padding-top: 14px; padding-bottom: 8px; color: var(--muted); font-size: 13px; border-top: 0; }

.article { max-width: 760px; }
.article h2 { font-size: 18px; font-weight: 600; margin: 30px 0 8px; }
.article p, .article li { color: #c9c8c2; }
.article li { margin: 6px 0; }
.article code { font-family: var(--mono); font-size: 13px; background: var(--surface-2); padding: 1px 6px; border-radius: 4px; }

.token { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 12px; }
.token input { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 12px; min-width: 260px; }

.skeleton { background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 50%, var(--surface) 100%); background-size: 200% 100%; animation: shimmer 1.6s linear infinite; border-radius: var(--radius); }
@keyframes shimmer { to { background-position: -200% 0; } }
.sk-row { height: 56px; margin-bottom: 8px; }
.error-box { border: 1px solid var(--down); background: var(--down-soft); border-radius: var(--radius); padding: 16px 18px; }

.foot { border-top: 1px solid var(--line); padding: 22px 24px 30px; color: var(--faint); font-size: 12.5px; text-align: center; }
.foot p { max-width: 900px; margin: 0 auto 6px; }

/* celular e tablet */
@media (max-width: 1000px) {
  .stats { grid-template-columns: repeat(3, 1fr); }
  .stat:nth-child(3) { border-right: 0; }
  .stat:nth-child(n+4) { border-top: 1px solid var(--line); }
  .grid-2, .grid-main { grid-template-columns: 1fr; }
  .trader { grid-template-columns: 32px 44px minmax(0, 1fr) 90px; }
  .trader .m.hide-s, .trader .eq { display: none; }
}
@media (max-width: 720px) {
  main { padding: 20px 16px 44px; }
  .nav__in { padding: 0 16px; gap: 12px; height: 56px; }
  .status { display: none; }
  .tabs { overflow-x: auto; scrollbar-width: none; }
  .tabs a { padding: 8px 10px; white-space: nowrap; }
  .tabs a[aria-current="page"]::after { left: 10px; right: 10px; bottom: -9px; }
  .page-head h1 { font-size: 25px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat { border-right: 0; border-top: 1px solid var(--line); }
  .stat:nth-child(-n+2) { border-top: 0; }
  .stat:nth-child(odd) { border-right: 1px solid var(--line); }
  .stat:nth-child(3) { border-right: 1px solid var(--line); }
  .stat:last-child:nth-child(odd) { grid-column: 1 / -1; border-right: 0; }
  .stat__value { font-size: 19px; }
  .detail-price { text-align: left; }
  .detail-price .big { font-size: 28px; }
  .kv { grid-template-columns: 1fr; }
  .scen { grid-template-columns: 1fr; }
  .scen > div { border-right: 0; border-top: 1px solid var(--line-soft); }
  .scen > div:first-child { border-top: 0; }
  .hide-m { display: none; }
  table { min-width: 0; }
  th, td { padding: 11px 6px; }
  th:first-child, td:first-child { padding-left: 12px; }
  th:last-child, td:last-child { padding-right: 12px; }
  .cell-name small { display: none; }
  .cell-name b { max-width: 70px; }
  .cell-name { gap: 8px; }
  td.rank, th:first-child:not(.l) { display: none; }
  table td, table th { font-size: 13px; }
  .chip { padding: 2px 7px; font-size: 11.5px; }
  td.rank { width: 30px; }
  .toolbar .search { max-width: none; }
  .signal-list a { grid-template-columns: 30px minmax(0, 1fr) auto 44px; gap: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .draw { stroke-dashoffset: 0; }
}
