:root {
  --bg: #0f1419;
  --panel: #182029;
  --text: #e7eef5;
  --muted: #8fa3b5;
  --accent: #3d9cf0;
  --danger: #e35d5d;
  --ok: #3bb273;
  --line: #243040;
  --font: "Segoe UI", system-ui, sans-serif;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--font);
  background: radial-gradient(1200px 600px at 10% -10%, #1a2a3a, var(--bg));
  color: var(--text);
  min-height: 100vh;
}
a { color: var(--accent); text-decoration: none; }
.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--line);
  background: rgba(0,0,0,.25);
}
.top nav { display: flex; gap: 1rem; align-items: center; }
.pill {
  display: inline-block;
  margin-left: .5rem;
  padding: .15rem .5rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: .75rem;
  text-transform: uppercase;
  color: var(--muted);
}
.pill.source { color: var(--ok); border-color: #2a5a40; }
.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  padding: 1rem 1.25rem 2rem;
}
.grid .wide { grid-column: 1 / -1; }
section {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1rem 1.1rem;
}
h2 { margin: 0 0 .75rem; font-size: 1rem; }
.metrics { display: grid; gap: .35rem; font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); font-size: .9rem; }
.error { color: var(--danger); }
.row { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: .75rem; }
button, .trade-form button {
  background: var(--accent);
  color: #041018;
  border: 0;
  border-radius: 8px;
  padding: .55rem .9rem;
  font-weight: 600;
  cursor: pointer;
}
button:disabled { opacity: .45; cursor: not-allowed; }
.pager { align-items: center; margin-top: .75rem; }
.inline { display: inline; margin: 0; }
.inline button { background: transparent; color: var(--muted); border: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: .45rem .35rem; border-bottom: 1px solid var(--line); }
.pos { color: var(--ok); }
.neg { color: var(--danger); }
.trade-form, .form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: .75rem;
  align-items: end;
}
label { display: grid; gap: .3rem; font-size: .85rem; color: var(--muted); }
input, select {
  background: #0d131a;
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 8px;
  padding: .55rem .65rem;
}
.auth {
  display: grid;
  place-items: center;
}
.auth-card {
  width: min(380px, 92vw);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.5rem;
}
.auth-card form { display: grid; gap: .8rem; }
.settings { padding: 1rem 1.25rem 2rem; display: grid; gap: 1rem; max-width: 980px; }
@media (max-width: 800px) {
  .grid { grid-template-columns: 1fr; }
}
