* { box-sizing: border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  margin: 0;
  background: #f4f6f8;
  color: #17202a;
  padding: 14px;
  line-height: 1.45;
}
header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  border-bottom: 1px solid #d8dee6;
  padding-bottom: 10px;
}
h1 { font-size: 20px; margin: 4px 0; color: #111827; }
h2 { font-size: 15px; color: #374151; margin: 0 0 8px; }
.muted { color: #6b7280; }
.pos { color: #15803d; }
.neg { color: #b91c1c; }
section { margin: 16px 0; padding-top: 4px; }
.cards { display: flex; flex-wrap: wrap; gap: 10px; }
.card {
  background: #ffffff;
  border: 1px solid #d9e0e8;
  border-radius: 8px;
  padding: 10px 14px;
  min-width: 128px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}
.card .k { font-size: 12px; color: #6b7280; }
.card .v { font-size: 18px; font-weight: 650; color: #111827; }
.card .v.pos { color: #15803d; }
.card .v.neg { color: #b91c1c; }
.card.ok { border-color: #16a34a; background: #f0fdf4; }
.card.warn { border-color: #d97706; background: #fffbeb; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  background: #ffffff;
  border: 1px solid #d9e0e8;
  border-radius: 8px;
  overflow: hidden;
}
th, td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid #e5e7eb;
  white-space: nowrap;
}
th { background: #eef2f7; color: #374151; font-weight: 650; }
tr:last-child td { border-bottom: 0; }
#positions, #trades { overflow-x: auto; }
#chart {
  background: #ffffff;
  border: 1px solid #d9e0e8;
  border-radius: 8px;
  padding: 8px;
}
.uplot, .uplot * { color: #111827; }
.uplot .u-axis text { fill: #4b5563; }
.banner {
  background: #fff7ed;
  border: 1px solid #f59e0b;
  color: #7c2d12;
  padding: 8px 12px;
  border-radius: 8px;
  margin: 10px 0;
}
.hidden { display: none; }
pre {
  background: #ffffff;
  border: 1px solid #d9e0e8;
  color: #111827;
  padding: 10px;
  border-radius: 8px;
  overflow-x: auto;
  font-size: 12px;
}
@media (max-width: 640px) {
  body { padding: 10px; }
  .card { min-width: calc(50% - 5px); }
  h1 { font-size: 18px; }
}
