* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: #0b0d10; color: #e7e9ec;
  font-family: ui-monospace, SFMono-Regular, "JetBrains Mono", Menlo, Monaco, Consolas, monospace;
  font-size: 13px; line-height: 1.45; padding: 24px 28px 60px;
}
a { color: #8ec9ff; text-decoration: none; }
a:hover { text-decoration: underline; }

header { display: flex; align-items: baseline; gap: 18px; margin-bottom: 10px; flex-wrap: wrap; }
header h1 { font-size: 20px; margin: 0; letter-spacing: 0.3px; }
header nav { margin-left: auto; display: flex; gap: 14px; }
header nav a { color: #8a9099; padding: 4px 8px; border-radius: 4px; }
header nav a.active { color: #e7e9ec; background: #131720; border: 1px solid #1d232c; }

.controls { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.controls label { color: #8a9099; font-size: 11px; text-transform: uppercase; letter-spacing: 0.8px; }
.controls select, .controls input.search {
  background: #0e1117; border: 1px solid #1d232c; color: #e7e9ec;
  padding: 6px 10px; border-radius: 6px; font-family: inherit; font-size: 13px;
}
.controls select { min-width: 220px; }
input.search { width: 360px; }

.sub { color: #8a9099; margin-bottom: 16px; font-size: 12px; }

h2 { font-size: 14px; margin: 24px 0 8px; color: #8ec9ff; text-transform: uppercase; letter-spacing: 1.2px; }

.kpi { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-bottom: 14px; }
.kpi .card { background: linear-gradient(180deg, #131720, #0e1117); border: 1px solid #1d232c; border-radius: 8px; padding: 10px 12px; }
.kpi .card .label { color: #8a9099; font-size: 11px; text-transform: uppercase; letter-spacing: 0.8px; }
.kpi .card .value { font-size: 18px; font-weight: 600; margin-top: 4px; }

.win { color: #4ade80; }
.lose { color: #f87171; }
.neu { color: #facc15; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid #1d232c; margin-bottom: 12px; }
.tab { padding: 8px 14px; cursor: pointer; border: 1px solid transparent; border-bottom: none; border-radius: 6px 6px 0 0; color: #8a9099; user-select: none; }
.tab.active { background: #131720; border-color: #1d232c; color: #e7e9ec; }
.panel { display: none; }
.panel.active { display: block; }

table { width: 100%; border-collapse: collapse; font-size: 12px; background: #0e1117; border: 1px solid #1d232c; border-radius: 8px; overflow: hidden; }
th, td { padding: 6px 10px; text-align: right; border-bottom: 1px solid #161b22; white-space: nowrap; }
th { background: #0a0d12; color: #8a9099; font-weight: 500; text-transform: uppercase; font-size: 11px; letter-spacing: 0.5px; cursor: pointer; user-select: none; position: sticky; top: 0; }
th.sort-asc::after { content:' ▲'; color: #8ec9ff; }
th.sort-desc::after { content:' ▼'; color: #8ec9ff; }
th:first-child, td:first-child { text-align: left; }
th:nth-child(2), td:nth-child(2) { text-align: left; }

tr.user-row { cursor: pointer; }
tr.user-row:hover { background: #131820; }
tr.user-row.open { background: #1a2230; }
.addr { color: #8ec9ff; font-family: ui-monospace, monospace; }

.drill { background: #0a0d12; padding: 14px; border-top: 1px solid #1d232c; }
.drill .grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.muted { color: #8a9099; }
.chart { background: #0e1117; border: 1px solid #1d232c; border-radius: 8px; padding: 4px; }

.tradelog { max-height: 280px; overflow: auto; font-size: 11px; background: #06080b; border: 1px solid #161b22; border-radius: 6px; padding: 8px; }
.tradelog table { border: none; background: transparent; font-size: 11px; }
.tradelog th, .tradelog td { padding: 3px 8px; }
.tradelog .b { color: #4ade80; }
.tradelog .a { color: #f87171; }

.snip-flag { display: inline-block; padding: 1px 6px; margin-left: 4px; background: rgba(250,204,21,0.15); color: #facc15; border-radius: 4px; font-size: 10px; }

.side-yes { color: #4ade80; }
.side-no { color: #f87171; }
.side-flat { color: #8a9099; }
.side-short { color: #facc15; }

.pager { display: flex; gap: 6px; align-items: center; margin: 10px 0; flex-wrap: wrap; }
.pager button { background: #131720; border: 1px solid #1d232c; color: #e7e9ec; padding: 4px 10px; border-radius: 4px; cursor: pointer; font-family: inherit; font-size: 12px; }
.pager button:disabled { opacity: 0.4; cursor: not-allowed; }
.pager .info { color: #8a9099; font-size: 12px; margin-left: 8px; }

.table-wrap { max-height: 720px; overflow: auto; border: 1px solid #1d232c; border-radius: 8px; }
.table-wrap table { border: none; }

.loading { padding: 24px; color: #8a9099; text-align: center; }
.error { padding: 14px; background: rgba(248,113,113,0.1); border: 1px solid #5a2020; color: #fca5a5; border-radius: 6px; margin: 16px 0; }

footer { margin-top: 40px; color: #555; font-size: 11px; text-align: center; }
