/* GPUID 管理后台样式。
   复用公站 style.css 的 CSS 变量与基础排版，只补后台自己的布局与控件，
   类名前缀一律 adm-，避免与公站样式互相影响。 */

.adm-body { background: var(--bg); }

.adm-shell { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

/* ---------- 顶栏 ---------- */
.adm-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.adm-header__inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 58px;
}
.adm-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 650;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}
.adm-nav { display: flex; gap: 6px; flex: 1; }
.adm-nav a {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
}
.adm-nav a:hover { background: var(--surface-muted); color: var(--text); }
.adm-nav a.is-active { background: var(--brand-soft); color: var(--brand-ink); }

.adm-logout { display: flex; align-items: center; gap: 12px; }
.adm-who { color: var(--text-muted); font-size: 13px; }

/* ---------- 主体 ---------- */
.adm-main { padding: 26px 20px 60px; }
.adm-page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.adm-title { font-size: 22px; margin: 0; }
.adm-subtitle { font-size: 16px; margin: 30px 0 12px; }

/* ---------- 卡片 / 提示 ---------- */
.adm-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
}
.adm-alert {
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  margin-bottom: 16px;
  font-size: 14px;
}
.adm-alert--ok { background: var(--brand-soft); color: var(--brand-ink); }
.adm-alert--bad { background: var(--bad-soft); color: var(--bad); }
.adm-empty { color: var(--text-muted); padding: 24px 0; }
.adm-note {
  margin-top: 26px;
  padding: 14px 16px;
  background: var(--surface-muted);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.7;
}
.adm-muted { color: var(--text-muted); font-size: 13px; }

/* ---------- 统计 ---------- */
.adm-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}
.adm-stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.adm-stat--total { border-color: var(--brand); background: var(--brand-soft); }
.adm-stat__label { color: var(--text-muted); font-size: 13px; }
.adm-stat__value { font-size: 28px; font-weight: 680; margin-top: 4px; }

/* ---------- 表单 ---------- */
.adm-form { display: flex; flex-direction: column; gap: 14px; margin-bottom: 22px; }
.adm-form__row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}
.adm-field { display: flex; flex-direction: column; gap: 6px; }
.adm-field__label { font-size: 13px; color: var(--text-muted); }
.adm-input {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 14px;
}
.adm-input:focus { outline: 2px solid var(--brand-soft); border-color: var(--brand); }
.adm-input--code { letter-spacing: 6px; font-size: 18px; text-align: center; }

.adm-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  align-items: end;
  margin-bottom: 18px;
}

/* ---------- 按钮 ---------- */
.adm-btn {
  align-self: flex-start;
  padding: 9px 18px;
  border: 1px solid var(--brand);
  border-radius: var(--radius-sm);
  background: var(--brand);
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 550;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}
.adm-btn:hover { background: var(--brand-strong); border-color: var(--brand-strong); }
.adm-btn--secondary { background: var(--surface); color: var(--brand-ink); border-color: var(--border); }
.adm-btn--secondary:hover { background: var(--brand-soft); border-color: var(--brand); }
.adm-btn--ghost {
  background: transparent;
  color: var(--text-muted);
  border-color: var(--border);
  padding: 7px 14px;
}
.adm-btn--ghost:hover { background: var(--surface-muted); color: var(--text); }
.adm-filters .adm-btn, .adm-page-head .adm-btn { align-self: center; }

.adm-link-btn {
  border: 0;
  background: none;
  padding: 0;
  color: var(--bad);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.adm-link-btn:hover { text-decoration: underline; }

/* ---------- 表格 ---------- */
.adm-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: 14px;
}
.adm-table th {
  text-align: left;
  font-weight: 600;
  font-size: 13px;
  color: var(--text-muted);
  background: var(--surface-muted);
  padding: 10px 14px;
  white-space: nowrap;
}
.adm-table td {
  padding: 10px 14px;
  border-top: 1px solid var(--border);
  vertical-align: middle;
}
.adm-table tbody tr:hover { background: #fafbfc; }
.adm-num { text-align: right; }
.adm-code { font-size: 15px; font-weight: 600; letter-spacing: 1px; }
.adm-actions { white-space: nowrap; }
.adm-actions a, .adm-actions form { display: inline-block; margin-right: 10px; }
.adm-actions a { color: var(--brand); text-decoration: none; font-size: 13px; }
.adm-actions a:hover { text-decoration: underline; }

.adm-chip {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 12px;
  background: var(--surface-muted);
  color: var(--text-muted);
}
.adm-chip--unused { background: var(--brand-soft); color: var(--brand-ink); }
.adm-chip--used { background: #e9f7f0; color: var(--grade-s); }
.adm-chip--void { background: var(--bad-soft); color: var(--bad); }

/* ---------- 分页 ---------- */
.adm-pager {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
}
.adm-pager .adm-muted { margin-right: auto; }

/* ---------- 登录页 ---------- */
.adm-body--login {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
}
.adm-login { width: 100%; max-width: 380px; }
.adm-login__brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 17px;
  font-weight: 650;
  margin-bottom: 20px;
}
.adm-login__form { display: flex; flex-direction: column; gap: 12px; margin-bottom: 14px; }
.adm-login__form .adm-btn { align-self: stretch; text-align: center; }
.adm-login__hint { color: var(--text-muted); font-size: 12px; text-align: center; line-height: 1.7; }