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

:root {
  --bg: #0b1020;
  --panel: #141b30;
  --panel-2: #1c2440;
  --border: #2a3358;
  --text: #e6ebff;
  --muted: #8b94b8;
  --accent: #4f7cff;
  --accent-2: #6ee7b7;
  --danger: #ff5c7a;
  --warn: #ffb84d;
}

body {
  font-family: -apple-system, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

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

/* 登录/注册卡片 */
.auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 32px 28px;
}

.auth-card h1 {
  font-size: 22px;
  margin-bottom: 4px;
  letter-spacing: 0.5px;
}

.auth-card .sub {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 24px;
}

.field { margin-bottom: 16px; }

.field label {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 6px;
}

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

.field input:focus { border-color: var(--accent); }

.btn {
  width: 100%;
  padding: 12px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
}

.btn:hover { opacity: 0.9; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn.secondary { background: var(--panel-2); border: 1px solid var(--border); color: var(--text); }

.error-msg {
  color: var(--danger);
  font-size: 13px;
  margin-bottom: 12px;
  min-height: 18px;
}

.switch-hint {
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  margin-top: 16px;
}

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

.topbar .brand { font-weight: 700; letter-spacing: 0.5px; }
.topbar .user { display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--muted); }

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

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

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

.stat-card .label { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.stat-card .value { font-size: 26px; font-weight: 700; }

/* 表格 */
.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 20px;
}

.panel h2 {
  font-size: 15px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--panel-2);
}

table { width: 100%; border-collapse: collapse; font-size: 14px; }

th, td { text-align: left; padding: 12px 18px; border-bottom: 1px solid var(--border); }

th { color: var(--muted); font-weight: 500; font-size: 12px; }

tr:last-child td { border-bottom: none; }

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.badge.online { background: rgba(110, 231, 183, 0.15); color: var(--accent-2); }
.badge.offline { background: rgba(139, 148, 184, 0.15); color: var(--muted); }
.badge.gpu { background: rgba(79, 124, 255, 0.15); color: var(--accent); }

.empty { padding: 30px; text-align: center; color: var(--muted); font-size: 14px; }
