:root {
  color-scheme: dark;
  --bg: #07111c;
  --panel: #0f1f30;
  --panel-2: #13283d;
  --line: #27445f;
  --text: #f4f8ff;
  --muted: #99b3cf;
  --accent: #1fd1c3;
  --blue: #2491ea;
  --danger: #ff5e68;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: radial-gradient(circle at 78% 0%, #0c3550 0, #07111c 32rem);
  color: var(--text);
  font-family: Arial, "Microsoft YaHei", sans-serif;
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 260px;
  padding: 24px 18px;
  border-right: 1px solid #20364c;
  background: #07101a;
}
.brand {
  display: inline-block;
  padding: 9px 12px;
  border-radius: 8px;
  background: #113052;
  color: #8dccff;
  font-weight: 700;
  margin-bottom: 22px;
}
.sidebar h1 { font-size: 30px; margin: 0 0 26px; }
nav a {
  display: block;
  padding: 14px 14px;
  margin: 8px 0;
  color: var(--text);
  text-decoration: none;
  background: rgba(255,255,255,.04);
  border-radius: 8px;
}
.main { margin-left: 260px; padding: 36px 64px 80px; }
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 28px;
}
.topbar h2 { font-size: 34px; margin: 8px 0 12px; }
.eyebrow { color: #bbdcff; font-weight: 700; margin: 0 0 8px; }
.muted { color: var(--muted); }
.actions { display: flex; gap: 10px; }
button {
  border: 1px solid #2c4c68;
  background: #142235;
  color: var(--text);
  border-radius: 8px;
  padding: 12px 18px;
  font-weight: 700;
  cursor: pointer;
}
button.primary { background: var(--accent); color: #001d24; border-color: var(--accent); }
button.danger { color: #ffd6d9; border-color: #71313b; }
button.wide { min-width: 240px; margin: 14px 0 24px; }
.stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(140px, 1fr));
  gap: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 22px;
}
.stat {
  background: rgba(255,255,255,.035);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
}
.stat span { display:block; color: var(--muted); font-size: 13px; margin-bottom: 12px; }
.stat strong { font-size: 30px; }
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 22px;
}
.panel h3 { font-size: 24px; margin: 0 0 18px; }
.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}
.section-heading h3 { margin-bottom: 6px; }
.section-heading .muted { margin-top: 0; }
.grid.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
input, textarea {
  width: 100%;
  color: var(--text);
  background: #071423;
  border: 1px solid #25435f;
  border-radius: 8px;
  padding: 12px 14px;
  outline: none;
}
textarea { min-height: 120px; resize: vertical; }
label { display: block; color: #acd1f4; margin: 10px 0 6px; font-size: 13px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; }
table { width: 100%; border-collapse: collapse; min-width: 1000px; }
th, td { padding: 14px 12px; border-bottom: 1px solid #20384f; text-align: left; vertical-align: top; }
th { color: #9fd0ff; background: #0b1929; }
td { color: #f5fbff; }
.pill {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: #123d43;
  color: #61f7d9;
  font-size: 12px;
}
.balance { color: #b7ff6f; font-weight: 800; }
.model-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}
.model-card {
  border: 1px solid var(--line);
  background: rgba(255,255,255,.025);
  border-radius: 8px;
  padding: 14px;
}
.model-card strong { display:block; margin-bottom: 8px; }
pre {
  white-space: pre-wrap;
  background: #071423;
  border: 1px solid #25435f;
  border-radius: 8px;
  padding: 16px;
  color: #d7ecff;
}
.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
}
.login-box {
  width: min(420px, 92vw);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 30px;
}
.login-box h1 { margin: 0 0 22px; }
.login-box button { width: 100%; margin-top: 14px; }
.error { color: var(--danger); min-height: 22px; }
@media (max-width: 900px) {
  .sidebar { position: static; width: auto; }
  .main { margin-left: 0; padding: 22px; }
  .grid.two, .stats { grid-template-columns: 1fr; }
}
