:root {
  --bg: #0f1217;
  --panel: #171b22;
  --panel-2: #202631;
  --text: #eef2f8;
  --muted: #9ba7b8;
  --line: #2a3240;
  --green: #22c55e;
  --red: #ef4444;
  --amber: #f59e0b;
  --cyan: #38bdf8;
  --shadow: rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    linear-gradient(135deg, rgba(56, 189, 248, 0.14), transparent 32%),
    radial-gradient(circle at 90% 12%, rgba(34, 197, 94, 0.12), transparent 24%),
    var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.app-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0;
}

.topbar,
.toolbar,
.summary-grid,
.table-wrap,
.note {
  width: 100%;
}

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

.eyebrow {
  margin: 0 0 6px;
  color: var(--cyan);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: 34px;
  line-height: 1.08;
}

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

.select-label {
  color: var(--muted);
  font-size: 13px;
}

button,
select,
input {
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: var(--panel);
  min-height: 40px;
  font: inherit;
}

button {
  cursor: pointer;
  padding: 0 14px;
  font-weight: 700;
}

button:hover,
select:hover,
input:focus {
  border-color: var(--cyan);
}

select {
  padding: 0 12px;
}

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

.metric {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(23, 27, 34, 0.86);
  box-shadow: 0 10px 28px var(--shadow);
  padding: 14px;
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 8px;
}

.metric strong {
  font-size: 18px;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 14px 0;
}

.tabs {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--panel);
}

.tab {
  min-height: 38px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
}

.tab.active {
  color: var(--text);
  background: var(--panel-2);
}

#search-input {
  width: min(320px, 100%);
  padding: 0 12px;
}

.table-wrap {
  position: relative;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(23, 27, 34, 0.92);
  box-shadow: 0 16px 40px var(--shadow);
}

.status {
  padding: 14px 16px;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}

.status.hidden {
  display: none;
}

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

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

th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

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

tbody tr:hover {
  background: rgba(255, 255, 255, 0.035);
}

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

.coin-icon {
  width: 30px;
  height: 30px;
  border-radius: 50%;
}

.coin-symbol {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

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

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

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

.signal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  height: 30px;
  border-radius: 8px;
  font-weight: 800;
}

.signal.long {
  color: #062512;
  background: var(--green);
}

.signal.short {
  color: #2c0707;
  background: var(--red);
}

.signal.wait {
  color: #2b1b03;
  background: var(--amber);
}

.target-cell strong,
.target-cell span {
  display: block;
}

.target-cell strong {
  font-size: 13px;
}

.target-cell span {
  color: var(--muted);
  font-size: 11px;
  margin-top: 3px;
}

.confidence {
  display: grid;
  grid-template-columns: 48px 110px;
  align-items: center;
  gap: 10px;
  justify-content: end;
}

.bar {
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: #303846;
}

.bar span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--cyan);
}

.note {
  margin-top: 14px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

@media (max-width: 760px) {
  .app-shell {
    width: min(100% - 20px, 1180px);
    padding: 18px 0;
  }

  .topbar,
  .toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .actions {
    justify-content: flex-start;
  }

  h1 {
    font-size: 28px;
  }

  .summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tabs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
  }

  #search-input {
    width: 100%;
  }
}

@media (max-width: 460px) {
  .summary-grid {
    grid-template-columns: 1fr;
  }
}
