:root {
  --bg: #f4f6f8;
  --panel: #fff;
  --text: #172026;
  --muted: #66727c;
  --line: #dce3e8;
  --primary: #24505a;
  --primary-dark: #173941;
  --danger: #a43d3d;
  --success: #226d4f;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
}
a { color: var(--primary); text-decoration: none; }
.center-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.admin-page {
  width: min(1280px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 18px 0 36px;
}
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  margin-bottom: 14px;
  box-shadow: 0 12px 34px rgba(23, 32, 38, 0.06);
}
.redeem-panel { width: min(520px, 100%); }
h1, h2 { margin: 0 0 12px; letter-spacing: 0; }
.muted, .support { color: var(--muted); }
.stack { display: grid; gap: 12px; }
label span { display: block; margin-bottom: 6px; color: var(--muted); font-size: 0.92rem; }
input, select {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: #fff;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
}
.button.primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.button.primary:hover { background: var(--primary-dark); }
.button.secondary, .button.ghost { background: #fff; }
.actions, .inline-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.actions.compact { gap: 4px; }
.inline-form input, .inline-form select { width: auto; min-width: 180px; }
.alert {
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 12px;
}
.alert.error { background: #fff1f1; color: var(--danger); border: 1px solid #f2c6c6; }
.alert.success { background: #effaf5; color: var(--success); border: 1px solid #bfdfcf; }
.admin-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.admin-top p { margin: 4px 0 0; color: var(--muted); }
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.tabs a {
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.grid.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}
.stat strong { display: block; font-size: 2rem; }
.stat span { color: var(--muted); }
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
  font-size: 0.92rem;
}
th, td {
  border-bottom: 1px solid var(--line);
  padding: 9px 8px;
  text-align: left;
  vertical-align: top;
}
code {
  font-family: Consolas, monospace;
  background: #f1f4f6;
  border-radius: 6px;
  padding: 2px 5px;
}
@media (max-width: 760px) {
  .admin-top, .inline-form { display: block; }
  .inline-form > * { margin-bottom: 8px; width: 100%; }
  table { display: block; overflow-x: auto; white-space: nowrap; }
}
