:root {
  --bg: #0f1115;
  --panel: #161a21;
  --panel-2: #1d222b;
  --border: #262c37;
  --text: #e6e9ef;
  --muted: #8b93a3;
  --accent: #4f8cff;
  --green: #2fbf71;
  --red: #ef4444;
  --yellow: #f5a524;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

.login-body {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px;
  width: 320px;
}

.login-card h1 { margin: 0 0 4px; font-size: 22px; }
.muted { color: var(--muted); font-size: 13px; margin-top: 0; }

label { display: block; margin: 14px 0 6px; font-size: 13px; color: var(--muted); }

input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--panel-2);
  color: var(--text);
  font-size: 14px;
}

button {
  margin-top: 20px;
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  border: none;
  background: var(--accent);
  color: white;
  font-weight: 600;
  cursor: pointer;
  font-size: 14px;
}

button:hover { opacity: 0.9; }
button.secondary { background: var(--panel-2); border: 1px solid var(--border); }
button.danger { background: var(--red); }

.error { color: var(--red); font-size: 13px; min-height: 18px; }
.success { color: var(--green); font-size: 13px; min-height: 18px; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--panel-2);
  color: var(--text);
  font-size: 14px;
}

.status-pending { color: var(--yellow); font-weight: 600; }
.status-approved { color: var(--green); font-weight: 600; }
.status-disabled { color: var(--red); font-weight: 600; }

details.advanced { margin-top: 10px; }
details.advanced summary { cursor: pointer; color: var(--muted); font-size: 13px; }
details.advanced .row { margin-top: 10px; }

/* Dashboard layout */
header.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--panel);
}

header.topbar h1 { font-size: 18px; margin: 0; }

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}
.badge.ok { background: rgba(47,191,113,0.15); color: var(--green); }
.badge.danger { background: rgba(239,68,68,0.15); color: var(--red); }

main {
  padding: 20px 24px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 16px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
}

.panel h2 { margin: 0 0 12px; font-size: 15px; }

table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 6px 4px; border-bottom: 1px solid var(--border); }
th { color: var(--muted); font-weight: 500; }

.side-buy { color: var(--green); font-weight: 600; }
.side-sell { color: var(--red); font-weight: 600; }

.row { display: flex; gap: 8px; align-items: center; }
.row > * { flex: 1; }

.full-width { grid-column: 1 / -1; }

pre.log { max-height: 240px; overflow-y: auto; font-size: 12px; color: var(--muted); white-space: pre-wrap; }
