:root {
  color-scheme: dark;
  --bg: #000;
  --fg: #f5f5f7;
  --muted: #8e8e93;
  --card: #1c1c1e;
  --line: #2c2c2e;
  --accent: #0a84ff;
  --green: #30d158;
  --red: #ff453a;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display",
    "Helvetica Neue", Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0; padding: 0; background: var(--bg); color: var(--fg);
  font-family: var(--font); font-size: 15px;
  max-width: 390px; margin-left: auto; margin-right: auto;
  min-height: 100%;
}
#app { min-height: 100vh; padding-bottom: 72px; }
.top {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 16px 8px; position: sticky; top: 0; background: rgba(0,0,0,.92);
  backdrop-filter: blur(12px); z-index: 5;
}
.brand { font-weight: 700; font-size: 20px; letter-spacing: -0.02em; }
.pill {
  background: var(--card); color: var(--muted); border-radius: 999px;
  padding: 4px 10px; font-size: 12px; text-transform: uppercase;
}
.view { display: none; padding: 8px 16px 24px; }
.view.active { display: block; }
h1 { font-size: 28px; margin: 4px 0 16px; letter-spacing: -0.03em; }
h2 { font-size: 13px; color: var(--muted); text-transform: uppercase;
  letter-spacing: 0.06em; margin: 20px 0 8px; font-weight: 600; }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stat {
  background: var(--card); border-radius: 14px; padding: 12px;
}
.stat .label { color: var(--muted); font-size: 12px; }
.stat .value { font-size: 22px; font-weight: 650; margin-top: 4px; }
.list { display: flex; flex-direction: column; gap: 8px; }
.item {
  background: var(--card); border-radius: 14px; padding: 12px 14px;
  border: 1px solid var(--line);
}
.item .title { font-weight: 600; }
.item .meta { color: var(--muted); font-size: 12px; margin-top: 4px; word-break: break-all; }
.badge {
  display: inline-block; font-size: 11px; padding: 2px 7px; border-radius: 6px;
  background: #2c2c2e; color: var(--fg); margin-left: 6px;
}
.badge.pass, .badge.open { background: rgba(48,209,88,.18); color: var(--green); }
.badge.kill, .badge.reject, .badge.closed { background: rgba(255,69,58,.18); color: var(--red); }
.card { background: var(--card); border-radius: 14px; padding: 4px 14px; }
.row {
  display: flex; justify-content: space-between; padding: 12px 0;
  border-bottom: 1px solid var(--line); font-size: 15px;
}
.row:last-child { border-bottom: 0; }
.field { display: block; margin: 16px 0 8px; color: var(--muted); font-size: 12px; }
.field input {
  display: block; width: 100%; margin-top: 6px; background: var(--card);
  border: 1px solid var(--line); border-radius: 12px; color: var(--fg);
  padding: 12px; font-size: 16px; font-family: var(--font);
}
.btn {
  width: 100%; border: 0; border-radius: 12px; padding: 14px;
  background: var(--accent); color: #fff; font-weight: 600; font-size: 16px;
  font-family: var(--font);
}
.tabbar {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: 0; width: 100%; max-width: 390px;
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: rgba(28,28,30,.94); backdrop-filter: blur(16px);
  border-top: 1px solid var(--line); padding: 6px 0 calc(6px + env(safe-area-inset-bottom));
}
.tab {
  background: transparent; border: 0; color: var(--muted);
  font-family: var(--font); font-size: 11px; padding: 8px 0; font-weight: 500;
}
.tab.active { color: var(--accent); }
#equityChart {
  width: 100%; height: 180px; background: var(--card); border-radius: 14px;
  display: block;
}
.mono {
  background: var(--card); border-radius: 12px; padding: 12px;
  font-size: 12px; overflow: auto; color: var(--muted);
}
