* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #0d1117;
  color: #e6edf3;
  min-height: 100vh;
}

.topbar {
  background: #161b22;
  border-bottom: 1px solid #30363d;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.topbar h1 { font-size: 18px; color: #58a6ff; font-weight: 600; }

.status-dot {
  width: 8px; height: 8px; border-radius: 50%;
  display: inline-block; margin-right: 6px;
}
.status-dot.green { background: #2ea043; }
.status-dot.red   { background: #da3633; }
.status-dot.grey  { background: #6e7681; }

.nav {
  background: #161b22;
  border-bottom: 1px solid #30363d;
  display: flex;
  gap: 0;
}

.nav button {
  background: none;
  border: none;
  color: #8b949e;
  padding: 12px 20px;
  cursor: pointer;
  font-size: 14px;
  border-bottom: 2px solid transparent;
  transition: all 0.15s;
}

.nav button.active { color: #58a6ff; border-bottom-color: #58a6ff; }
.nav button:hover  { color: #e6edf3; background: #21262d; }

.container { padding: 24px; max-width: 1200px; margin: 0 auto; }

.card {
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 16px;
}

.card h2 { font-size: 15px; color: #8b949e; margin-bottom: 16px; font-weight: 500; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }

.stat { background: #0d1117; border-radius: 6px; padding: 14px; }
.stat .label { font-size: 11px; color: #6e7681; text-transform: uppercase; letter-spacing: 0.5px; }
.stat .value { font-size: 22px; font-weight: 600; margin-top: 4px; }
.stat .value.green { color: #3fb950; }
.stat .value.red   { color: #f85149; }
.stat .value.blue  { color: #58a6ff; }

table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { color: #6e7681; font-weight: 500; text-align: left; padding: 8px 12px; border-bottom: 1px solid #21262d; }
td { padding: 10px 12px; border-bottom: 1px solid #21262d; }
tr:hover td { background: #1c2128; }

.tag {
  display: inline-block; padding: 2px 8px; border-radius: 12px;
  font-size: 11px; font-weight: 500;
}
.tag.buy    { background: #0d4429; color: #3fb950; }
.tag.sell   { background: #3d1a1a; color: #f85149; }
.tag.active { background: #1a2a4a; color: #58a6ff; }

.btn {
  padding: 8px 16px; border-radius: 6px; border: none;
  cursor: pointer; font-size: 13px; font-weight: 500; transition: opacity 0.15s;
}
.btn:hover { opacity: 0.8; }
.btn.primary { background: #238636; color: #fff; }
.btn.danger  { background: #da3633; color: #fff; }
.btn.blue    { background: #1f6feb; color: #fff; }
.btn.ghost   { background: #21262d; color: #c9d1d9; border: 1px solid #30363d; }

.form-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 12px; }

.form-group { display: flex; flex-direction: column; gap: 4px; }
.form-group label { font-size: 12px; color: #8b949e; }

input, select {
  background: #0d1117;
  border: 1px solid #30363d;
  border-radius: 6px;
  color: #e6edf3;
  padding: 7px 10px;
  font-size: 13px;
  outline: none;
  min-width: 120px;
}

input:focus, select:focus { border-color: #58a6ff; }

.alert {
  padding: 10px 14px; border-radius: 6px; font-size: 13px; margin-bottom: 12px;
}
.alert.success { background: #0d4429; color: #3fb950; border: 1px solid #2ea043; }
.alert.error   { background: #3d1a1a; color: #f85149; border: 1px solid #da3633; }
.alert.info    { background: #1a2a4a; color: #58a6ff; border: 1px solid #1f6feb; }

.login-wrap {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; min-height: 80vh; gap: 20px;
}
.login-wrap h2 { font-size: 24px; color: #58a6ff; }
.login-wrap p  { color: #8b949e; font-size: 14px; text-align: center; max-width: 400px; }
