/* 星耀NX自定义页签 · 管理后台样式（与客户端同一套浅色蓝主题） */
:root {
  --accent: #0078c8;
  --accent-hover: #3399dd;
  --accent-press: #0064aa;
  --bg: #f5f6f8;
  --panel: #ffffff;
  --border: #dbe6f2;
  --text: #202124;
  --muted: #6b7280;
  --danger: #d9534f;
  --ok: #1f9d55;
  --radius: 8px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.6 "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
}

.hidden { display: none !important; }
.spacer { flex: 1; }
code { background: #eef3f8; padding: 1px 5px; border-radius: 4px; }

/* ---------- 登录 / 注册 ---------- */
.auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, #eaf3fb 0%, #f5f6f8 55%, #eef4fa 100%);
}

.auth-card {
  width: 360px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px 26px 26px;
  box-shadow: 0 10px 30px rgba(0, 60, 110, .10);
}

.auth-brand { font-size: 19px; font-weight: 700; color: var(--accent); }
.auth-sub { color: var(--muted); margin: 2px 0 18px; }

.auth-tabs { display: flex; gap: 6px; margin-bottom: 16px; }
.auth-tabs button {
  flex: 1;
  padding: 8px 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  color: var(--muted);
  cursor: pointer;
  font-size: 14px;
}
.auth-tabs button.on { background: var(--accent); border-color: var(--accent); color: #fff; }

label { display: block; margin-bottom: 12px; color: var(--muted); font-size: 13px; }
input[type="text"], input[type="email"], input[type="password"], input[type="search"], select, textarea {
  display: block;
  width: 100%;
  margin-top: 5px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  color: var(--text);
  font: inherit;
  outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0, 120, 200, .12); }
textarea { resize: vertical; }

button.primary, button.ghost, button.link, button.danger {
  border-radius: var(--radius);
  cursor: pointer;
  font: inherit;
  padding: 8px 16px;
  border: 1px solid transparent;
  transition: background .15s, color .15s;
}
button.primary { background: var(--accent); color: #fff; }
button.primary:hover { background: var(--accent-hover); }
button.primary:active { background: var(--accent-press); }
button.primary:disabled { background: #b9d4e8; cursor: default; }
button.ghost { background: #fff; color: var(--text); border-color: var(--border); }
button.ghost:hover { background: #eaf3fb; }
button.danger { background: #fff; color: var(--danger); border-color: #f0c8c6; }
button.danger:hover { background: var(--danger); color: #fff; border-color: var(--danger); }
button.link {
  background: none;
  color: var(--accent);
  padding: 2px 6px;
}
button.link:hover { text-decoration: underline; }
button.block { width: 100%; margin-top: 6px; }

.err { color: var(--danger); font-size: 13px; margin: 8px 0; white-space: pre-wrap; }
.hint { color: var(--muted); font-size: 12.5px; margin: 10px 0 0; }

/* ---------- 主体布局 ---------- */
.topbar {
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  background: var(--accent);
  color: #fff;
}
.brand { font-size: 16px; font-weight: 700; }
.brand span { font-weight: 400; opacity: .85; font-size: 13px; }
.topright { display: flex; align-items: center; gap: 12px; }
.who { font-size: 13px; opacity: .95; }
.topbar .ghost { background: rgba(255, 255, 255, .16); color: #fff; border-color: rgba(255, 255, 255, .35); }
.topbar .ghost:hover { background: rgba(255, 255, 255, .3); }

.body { display: flex; align-items: flex-start; gap: 18px; padding: 18px 20px 40px; }

.side { width: 168px; flex: none; display: flex; flex-direction: column; gap: 6px; }
.side button {
  text-align: left;
  padding: 9px 14px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  display: flex;
  align-items: center;
  gap: 6px;
}
.side button:hover { background: #eaf3fb; }
.side button.on { background: var(--accent); color: #fff; }
.badge {
  background: var(--danger);
  color: #fff;
  border-radius: 9px;
  padding: 0 6px;
  font-size: 11.5px;
  line-height: 17px;
}

.content { flex: 1; min-width: 0; }
.content h2 { margin: 4px 0 14px; font-size: 17px; }

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 16px;
}
.panel-title { font-weight: 700; margin-bottom: 12px; }

.stats { display: flex; flex-wrap: wrap; gap: 14px; }
.stat {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 22px;
  min-width: 108px;
}
.stat b { display: block; font-size: 24px; color: var(--accent); }
.stat span { color: var(--muted); font-size: 12.5px; }

.toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.toolbar select, .toolbar input[type="search"] { width: auto; margin: 0; min-width: 160px; }

/* ---------- 表格 ---------- */
table { width: 100%; border-collapse: collapse; }
th, td { padding: 9px 10px; border-bottom: 1px solid #edf2f7; text-align: left; vertical-align: middle; }
th { color: var(--muted); font-weight: 400; font-size: 12.5px; background: #f8fafc; }
tbody tr:hover { background: #f6fafd; }
td.actions { white-space: nowrap; }

.tag {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 10px;
  font-size: 12px;
  border: 1px solid transparent;
}
.tag.pending { background: #fff5e6; color: #b7791f; border-color: #f3dfb8; }
.tag.active { background: #e8f7ee; color: var(--ok); border-color: #c4e8d4; }
.tag.disabled { background: #fdeceb; color: var(--danger); border-color: #f4ccca; }
.tag.admin { background: #e8f2fb; color: var(--accent); border-color: #c9e0f2; }
.tag.user { background: #f2f3f5; color: var(--muted); border-color: #e3e6ea; }

.empty { color: var(--muted); padding: 18px 4px; }

/* ---------- 提示条 ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%);
  background: #202124;
  color: #fff;
  padding: 10px 18px;
  border-radius: 20px;
  font-size: 13px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .2);
  max-width: 70vw;
  z-index: 99;
}
