/* =========================================================
   破冰活动助力 — 样式
   暖白底色 + 一点琥珀色的光
   ========================================================= */

:root {
  --bg: #f7f4ef;
  --surface: #fffdf9;
  --surface-2: #f2ede4;
  --ink: #211d18;
  --ink-2: #4a443c;
  --muted: #6d6459;
  --line: #e7dfd3;
  --accent: #d9822b;
  --accent-deep: #9c570f;
  --accent-soft: #fbead6;
  --good: #3f7449;
  --danger: #b23a28;
  --radius-lg: 22px;
  --radius: 16px;
  --radius-sm: 11px;
  --shadow-sm: 0 1px 2px rgba(50, 40, 25, 0.05), 0 6px 18px -12px rgba(50, 40, 25, 0.25);
  --shadow-md: 0 1px 2px rgba(50, 40, 25, 0.04), 0 24px 60px -32px rgba(60, 45, 25, 0.45);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --font-num: "SF Mono", "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

/*
  hidden 属性必须真正隐藏。
  类选择器（如 .admin-login { display: grid }）优先级高于浏览器默认的
  [hidden] { display: none }，不加这条会让「隐藏」的元素继续占位置。
*/
[hidden] { display: none !important; }

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }

button { font: inherit; color: inherit; }

::selection { background: var(--accent-soft); }

/* 背景光晕 */
.glow {
  position: fixed;
  z-index: 0;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(70px);
  opacity: 0.55;
}
.glow-a {
  width: 520px; height: 520px;
  top: -220px; right: -140px;
  background: radial-gradient(circle, #ffd9a8 0%, rgba(255, 217, 168, 0) 68%);
}
.glow-b {
  width: 460px; height: 460px;
  bottom: -240px; left: -160px;
  background: radial-gradient(circle, #cfe0d4 0%, rgba(207, 224, 212, 0) 70%);
}

/* ---------------- 通用组件 ---------------- */

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-weight: 650;
  letter-spacing: 0.01em;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  border-radius: 11px;
  color: #fff;
  background: linear-gradient(145deg, #bb6416, #9a4d0a);
  box-shadow: 0 6px 16px -8px rgba(207, 114, 32, 0.9);
}
.brand-mark svg { width: 20px; height: 20px; }
.brand-name { font-size: 17px; }
.brand-sm .brand-mark { width: 30px; height: 30px; border-radius: 9px; }
.brand-sm .brand-mark svg { width: 18px; height: 18px; }
.brand-sm .brand-name { font-size: 16px; }

.btn {
  --btn-bg: var(--surface);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0 20px;
  height: 44px;
  background: var(--btn-bg);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: transform 0.16s ease, background 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: translateY(1px) scale(0.994); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-primary {
  color: #fff;
  background: linear-gradient(145deg, #bc6612, #9a4d0a);
  box-shadow: 0 12px 26px -14px rgba(203, 111, 29, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}
.btn-primary:hover:not([disabled]) { background: linear-gradient(145deg, #c46d17, #a2500c); }

.btn-soft {
  color: var(--ink-2);
  background: var(--surface-2);
  border-color: var(--line);
}
.btn-soft:hover:not([disabled]) { background: #ece4d7; }

.btn-ghost {
  color: var(--ink-2);
  background: transparent;
  border-color: var(--line);
}
.btn-ghost:hover { background: var(--surface); }
.btn-ghost.btn-sm { min-height: 44px; padding: 0 16px; }

.btn-block { width: 100%; }
.btn-lg { height: 52px; font-size: 16px; border-radius: 15px; flex: 1; }
.btn-sm { height: 36px; padding: 0 14px; font-size: 14px; }

.btn-kbd {
  display: inline-grid;
  place-items: center;
  min-width: 20px; height: 20px;
  padding: 0 5px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.22);
  font-family: var(--font-num);
  font-size: 11px;
  font-weight: 500;
}

.pill {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 11px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
}
.pill-soft { background: var(--surface-2); color: var(--muted); }

.card {
  position: relative;
  z-index: 1;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

/* ---------------- 登录页 ---------------- */

.auth-page {
  display: grid;
  place-items: center;
  padding: clamp(20px, 5vw, 56px);
}
.auth-wrap {
  position: relative;
  z-index: 1;
  width: min(1020px, 100%);
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(28px, 6vw, 72px);
  align-items: center;
}

.auth-brand { padding: 8px 0; }
.auth-title {
  margin: 34px 0 14px;
  font-size: clamp(30px, 3.6vw, 44px);
  line-height: 1.28;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.auth-lead {
  margin: 0 0 30px;
  color: var(--muted);
  font-size: 16px;
}

.auth-points { list-style: none; margin: 0; padding: 0; display: grid; gap: 13px; }
.auth-points li {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  color: var(--ink-2);
  font-size: 14.5px;
}
.dot {
  flex: none;
  width: 7px; height: 7px;
  margin-top: 9px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.auth-card {
  width: 100%;
  padding: clamp(24px, 3.4vw, 36px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 26px;
  box-shadow: var(--shadow-md);
}

.auth-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  margin-bottom: 26px;
  background: var(--surface-2);
  border-radius: 12px;
}
.auth-tab {
  border: 0;
  background: transparent;
  padding: 0 22px;
  min-height: 44px;
  border-radius: 9px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}
.auth-tab.is-active {
  color: var(--ink);
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(50, 40, 25, 0.1);
}

.auth-card-title { margin: 0 0 6px; font-size: 23px; font-weight: 680; letter-spacing: -0.01em; }
.auth-card-sub { margin: 0 0 24px; color: var(--muted); font-size: 14px; }

.form { display: grid; gap: 16px; }

.field { display: grid; gap: 7px; }
.field-label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.field-opt { margin-left: 6px; font-weight: 500; color: var(--muted); font-size: 12px; }
.field input {
  width: 100%;
  height: 48px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fffefb;
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}
.field input::placeholder { color: #7f756a; }
.field input:focus {
  outline: none;
  border-color: #e3a45d;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(217, 130, 43, 0.13);
}

/* 验证码行：输入框 + 获取验证码按钮并排 */
.code-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}
.code-row input {
  width: 100%;
  font-family: var(--font-num);
  letter-spacing: 0.12em;
}
.code-btn {
  height: 48px;
  min-width: 124px;
  padding: 0 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  white-space: nowrap;
}
.code-btn.is-counting {
  color: var(--muted);
  background: var(--surface-2);
  border-color: var(--line);
}

/* 昵称行：输入框 + 换一个 */
.nick-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}
.nick-btn {
  height: 48px;
  min-width: 86px;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  white-space: nowrap;
}

.form-error {
  margin: 0;
  padding: 10px 13px;
  border-radius: 10px;
  background: #fbece8;
  border: 1px solid #f0cfc7;
  color: var(--danger);
  font-size: 13.5px;
}

.demo-code {
  margin: 0;
  padding: 10px 13px;
  border-radius: 10px;
  background: var(--accent-soft);
  border: 1px solid #f2dcbd;
  color: #8a5410;
  font-size: 13px;
  line-height: 1.5;
}

#submitBtn { margin-top: 6px; height: 50px; }
.btn-label { pointer-events: none; }
.btn.is-loading { opacity: 0.75; pointer-events: none; }
.btn.is-loading .btn-label::after { content: "…"; }


.auth-foot { margin: 20px 0 0; text-align: center; color: var(--muted); font-size: 13.5px; }
.link {
  border: 0;
  padding: 10px 2px;
  margin: -10px 0;
  background: none;
  color: var(--accent-deep);
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(184, 102, 26, 0.35);
}

/* ---------------- 站点页 ---------------- */

.app-page { padding-bottom: 28px; }

.topbar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: min(1060px, calc(100% - 40px));
  margin: 0 auto;
  padding: 20px 0 6px;
}
.topbar-right { display: flex; align-items: center; gap: 10px; }
.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 13px 0 4px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 13.5px;
  color: var(--ink-2);
  max-width: 220px;
}
.user-chip span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-size: 13px;
  font-weight: 700;
}

.app-main {
  position: relative;
  z-index: 1;
  width: min(1060px, calc(100% - 40px));
  margin: 0 auto;
  display: grid;
  gap: 20px;
  padding-top: 18px;
}

/* 顶部主卡 */
.hero { padding: clamp(22px, 3.4vw, 34px); }
.hero-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}
.eyebrow {
  margin: 0 0 8px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--accent-deep);
  text-transform: uppercase;
}
.hero-title { margin: 0 0 8px; font-size: clamp(24px, 3vw, 32px); line-height: 1.3; letter-spacing: -0.012em; }
.hero-sub { margin: 0; color: var(--muted); font-size: 14.5px; max-width: 54ch; }

.hero-badge {
  flex: none;
  display: grid;
  grid-template-columns: auto auto;
  align-items: baseline;
  justify-content: center;
  gap: 0 2px;
  padding: 12px 18px;
  border-radius: 18px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  text-align: center;
}
.hero-badge-num { font-family: var(--font-num); font-size: 30px; font-weight: 600; letter-spacing: -0.02em; color: var(--accent-deep); }
.hero-badge-pct { font-size: 15px; color: var(--accent-deep); font-weight: 600; }
.hero-badge-label { grid-column: 1 / -1; font-size: 12px; color: var(--muted); margin-top: 2px; }

.progress {
  height: 12px;
  margin: 24px 0 16px;
  border-radius: 999px;
  background: var(--surface-2);
  overflow: hidden;
  border: 1px solid #eee6da;
}
.progress-fill {
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #f0b168, #d9822b 55%, #c56a17);
  box-shadow: 0 0 18px rgba(217, 130, 43, 0.55);
  transition: width 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.hero-foot { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px 20px; }
.hero-nums { display: flex; align-items: baseline; gap: 8px; }
.hero-nums strong { font-family: var(--font-num); font-size: 26px; letter-spacing: -0.02em; }
.hero-of { color: var(--muted); font-size: 14px; }
.hero-meta { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13.5px; flex-wrap: wrap; }
.hero-meta b { color: var(--ink-2); font-weight: 650; }
.sep { width: 1px; height: 12px; background: var(--line); }

/* 两栏 */
.grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 20px;
  align-items: start;
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.card-title { margin: 0; font-size: 17px; font-weight: 660; letter-spacing: -0.005em; }

.boost-card, .board-card { padding: clamp(20px, 2.6vw, 26px); }

.quota { display: flex; gap: 7px; margin-bottom: 14px; }
.quota i {
  flex: 1;
  height: 8px;
  border-radius: 999px;
  background: var(--surface-2);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}
.quota i.on {
  background: linear-gradient(90deg, #efa64c, #d9822b);
  box-shadow: 0 0 10px rgba(217, 130, 43, 0.4);
}

.boost-tip { margin: 0 0 18px; color: var(--muted); font-size: 13.5px; min-height: 22px; }

.boost-actions { display: flex; gap: 10px; }

.mini-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 20px 0;
}
.mini-stats > div {
  padding: 13px 15px;
  border-radius: var(--radius);
  background: var(--surface-2);
  border: 1px solid var(--line);
}
.mini-stats span { display: block; font-size: 12.5px; color: var(--muted); }
.mini-stats strong { display: block; margin-top: 2px; font-family: var(--font-num); font-size: 21px; font-weight: 600; letter-spacing: -0.01em; }

.history { border-top: 1px solid var(--line); padding-top: 16px; }
.history-title { margin: 0 0 10px; font-size: 12.5px; font-weight: 600; letter-spacing: 0.05em; color: var(--muted); }
.history-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.history-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 2px;
  font-size: 13.5px;
  color: var(--ink-2);
  border-bottom: 1px dashed rgba(231, 223, 211, 0.85);
}
.history-list li:last-child { border-bottom: 0; }
.history-list time { font-family: var(--font-num); font-size: 12.5px; color: var(--muted); }
.history-empty { color: var(--muted); justify-content: flex-start !important; }
.history-tag {
  display: inline-flex; align-items: center; gap: 7px;
}
.history-tag i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

.board { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; counter-reset: none; }
.board li {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 12px;
  font-size: 14px;
}
.board li.is-me { background: var(--accent-soft); }
.board-rank {
  display: grid;
  place-items: center;
  width: 24px; height: 24px;
  border-radius: 8px;
  font-family: var(--font-num);
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  background: var(--surface-2);
}
.board li:nth-child(1) .board-rank { background: #f6dfb8; color: #7d4c0e; }
.board li:nth-child(2) .board-rank { background: #e9e6df; color: #5c554b; }
.board li:nth-child(3) .board-rank { background: #f0e0cd; color: #714b24; }
.board-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.board-total { font-family: var(--font-num); font-size: 13.5px; color: var(--ink-2); white-space: nowrap; }
.board-total em { font-style: normal; color: var(--muted); font-size: 11.5px; margin-left: 3px; }
.board-empty { display: block !important; color: var(--muted); padding: 14px 2px !important; }
.board-foot { margin: 14px 0 0; font-size: 12.5px; color: var(--muted); }

.footer {
  position: relative;
  z-index: 1;
  margin-top: 34px;
  text-align: center;
  font-size: 12.5px;
  color: var(--muted);
}

/* 提示条 */
.toast {
  position: fixed;
  left: 50%;
  bottom: 30px;
  z-index: 20;
  transform: translate(-50%, 14px);
  padding: 11px 20px;
  border-radius: 999px;
  background: #2a2520;
  color: #fdf9f2;
  font-size: 13.5px;
  font-weight: 500;
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.6);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.24s ease, transform 0.24s ease;
  max-width: calc(100% - 40px);
  text-align: center;
}
.toast.is-show { opacity: 1; transform: translate(-50%, 0); }

/* 助力动效 */
@keyframes pop { 0% { transform: scale(1); } 45% { transform: scale(1.06); } 100% { transform: scale(1); } }
.pop { animation: pop 0.42s ease; }

@keyframes floatUp {
  from { opacity: 0; transform: translate(-50%, 8px); }
  30% { opacity: 1; }
  to { opacity: 0; transform: translate(-50%, -58px); }
}
.spark {
  position: fixed;
  z-index: 19;
  left: 50%;
  bottom: 96px;
  pointer-events: none;
  font-family: var(--font-num);
  font-size: 20px;
  font-weight: 700;
  color: var(--accent-deep);
  animation: floatUp 1.1s ease forwards;
  text-shadow: 0 2px 10px rgba(255, 255, 255, 0.9);
}

/* ---------------- 响应式 ---------------- */

@media (max-width: 880px) {
  .auth-wrap { grid-template-columns: 1fr; gap: 28px; }
  .auth-brand { text-align: left; }
  .auth-title { margin-top: 24px; font-size: clamp(26px, 6.4vw, 34px); }
  .auth-points { display: none; }
  .auth-lead { margin-bottom: 4px; }
  .grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  body { font-size: 15px; }
  .auth-page { padding: 18px 16px 28px; place-items: start center; }
  .auth-card { padding: 22px 18px; border-radius: 20px; }
  .app-main, .topbar { width: calc(100% - 28px); }
  .topbar { padding-top: 14px; }
  .user-chip { max-width: 132px; padding-right: 8px; }
  .hero { padding: 18px; }
  .hero-head { flex-direction: column-reverse; gap: 12px; }
  .hero-badge {
    display: flex;
    align-items: baseline;
    gap: 2px;
    padding: 8px 14px;
  }
  .hero-badge-num { font-size: 24px; }
  .hero-badge-label { margin: 0 0 0 6px; }
  .progress { margin: 18px 0 12px; }
  .hero-meta { font-size: 12px; gap: 8px; }
  .sep { display: none; }
  .boost-actions { gap: 8px; }
  .btn-lg { height: 48px; font-size: 15px; }
  .mini-stats strong { font-size: 19px; }
  .footer { margin-top: 24px; }
  .code-btn { min-width: 108px; padding: 0 12px; font-size: 13.5px; }
  .code-row { gap: 8px; }
}

@media (max-width: 360px) {
  .code-row { grid-template-columns: 1fr; }
  .code-btn { width: 100%; }
}

/* =========================================================
   等待短信状态（登录页）
   ========================================================= */

.wait-box {
  margin: 0;
  padding: 13px 15px;
  border-radius: 12px;
  background: var(--accent-soft);
  border: 1px solid #f2dcbd;
}
.wait-head {
  display: flex;
  align-items: center;
  gap: 9px;
}
.wait-title {
  font-size: 14px;
  font-weight: 650;
  color: #7d4c0e;
}
.wait-text {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.6;
  color: #8a5410;
}
.wait-left {
  margin: 6px 0 0;
  font-family: var(--font-num);
  font-size: 12.5px;
  color: #9c570f;
}
.wait-left:empty { display: none; }
.wait-spinner {
  flex: none;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 2px solid rgba(156, 87, 15, 0.28);
  border-top-color: #9c570f;
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* =========================================================
   管理后台
   ========================================================= */

.admin-page { padding-bottom: 40px; }

.admin-login {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  min-height: 100dvh;
  padding: 20px;
}
.admin-login-card { width: min(430px, 100%); }
.admin-login-card code {
  padding: 1px 5px;
  border-radius: 5px;
  background: var(--surface-2);
  font-family: var(--font-num);
  font-size: 12.5px;
  color: var(--ink-2);
}

.admin-shell { position: relative; z-index: 1; }

.admin-main {
  width: min(860px, calc(100% - 32px));
  margin: 0 auto;
  padding-top: 14px;
  display: grid;
  gap: 16px;
}

.admin-tip {
  padding: 14px 16px;
  border-radius: var(--radius);
  background: var(--accent-soft);
  border: 1px solid #f2dcbd;
  color: #7d4c0e;
  font-size: 13.5px;
  line-height: 1.7;
}
.admin-tip strong { color: #6d430b; }

.admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.admin-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 13.5px;
  color: var(--muted);
}
.admin-stats b {
  font-family: var(--font-num);
  font-size: 16px;
  color: var(--ink);
  margin-left: 3px;
}
.admin-actions { display: flex; align-items: center; gap: 10px; }
.admin-auto { font-size: 12px; color: var(--muted); }

.admin-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.admin-empty {
  padding: 26px 18px;
  text-align: center;
  color: var(--muted);
  font-size: 13.5px;
  background: var(--surface);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}

.admin-item {
  padding: 15px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  display: grid;
  gap: 11px;
}
.admin-item.is-sent {
  border-left-color: var(--good);
  background: #fbfdf9;
}

.admin-item-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.admin-phone-wrap { display: flex; align-items: center; gap: 9px; }
.admin-phone {
  font-family: var(--font-num);
  font-size: 19px;
  letter-spacing: 0.02em;
}
.admin-tag {
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
}
.tag-pending { background: var(--accent-soft); color: #9c570f; }
.tag-sent { background: #e8f1e8; color: #3f7449; }

.admin-item-meta { font-size: 12.5px; color: var(--muted); }

.admin-code-row {
  display: grid;
  gap: 8px;
  padding: 11px 13px;
  background: var(--surface-2);
  border-radius: 11px;
}
.admin-code {
  font-family: var(--font-num);
  font-size: 25px;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: #7d4c0e;
}
.admin-msg {
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.6;
  word-break: break-all;
}

.admin-item-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.admin-danger { color: var(--danger); border-color: #f0cfc7; }
.admin-danger:hover { background: #fbece8; }

.admin-history {
  margin-top: 6px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.admin-history-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: grid;
  gap: 2px;
}
.admin-history-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  padding: 8px 2px;
  border-bottom: 1px dashed rgba(231, 223, 211, 0.9);
  font-size: 13px;
  color: var(--ink-2);
}
.admin-history-list li:last-child { border-bottom: 0; }
.admin-history-list time { font-family: var(--font-num); font-size: 12px; color: var(--muted); }
.admin-status {
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 11.5px;
  background: var(--surface-2);
  color: var(--muted);
}
.status-pending { background: var(--accent-soft); color: #9c570f; }
.status-sent { background: #e8f1e8; color: #3f7449; }
.status-used { background: #e6eef7; color: #2f5c85; }

@media (max-width: 560px) {
  .admin-main { width: calc(100% - 24px); }
  .admin-phone { font-size: 17px; }
  .admin-code { font-size: 22px; letter-spacing: 0.18em; }
  .admin-item { padding: 13px; }
  .admin-item-actions .btn { flex: 1 1 auto; }
  .admin-history-list li { grid-template-columns: minmax(0, 1fr) auto; }
  .admin-history-list time { grid-column: 1 / -1; font-size: 11.5px; }
}

/* =========================================================
   改名弹窗
   ========================================================= */

.user-chip {
  border: 1px solid var(--line);
  cursor: pointer;
  min-height: 44px;
  transition: border-color 0.16s ease, background 0.16s ease;
}
.user-chip:hover { border-color: #e3a45d; background: var(--surface); }
.user-chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.chip-edit {
  flex: none;
  margin-left: 2px;
  padding: 0 6px;
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 11px;
  line-height: 17px;
}
.user-chip:hover .chip-edit { background: var(--accent-soft); color: var(--accent-deep); }

.modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 20px;
}
.modal-mask {
  position: absolute;
  inset: 0;
  background: rgba(33, 29, 24, 0.42);
  backdrop-filter: blur(2px);
}
.modal-card {
  position: relative;
  width: min(420px, 100%);
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow-md);
  animation: modalIn 0.2s ease;
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to { opacity: 1; transform: none; }
}
.modal-title { margin: 0 0 6px; font-size: 20px; font-weight: 680; }
.modal-sub { margin: 0 0 18px; color: var(--muted); font-size: 13.5px; }
.modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 4px;
}
.modal-actions .btn { width: 100%; height: 46px; }

@media (max-width: 560px) {
  .modal-card { padding: 20px; border-radius: 18px; }
  .nick-btn { min-width: 78px; padding: 0 10px; font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

/* 验证码框有内容时，按钮变成「验证」 */
.code-btn.is-verify {
  color: #fff;
  background: linear-gradient(145deg, #bc6612, #9a4d0a);
  border-color: transparent;
  box-shadow: 0 10px 22px -12px rgba(154, 77, 10, 0.9);
}
.code-btn.is-verify:hover:not([disabled]) {
  background: linear-gradient(145deg, #c46d17, #a2500c);
}

/* =========================================================
   两步验证后台
   ========================================================= */

.admin-code-input {
  flex: 1 1 150px;
  min-width: 120px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fffefb;
  font-family: var(--font-num);
  font-size: 17px;
  letter-spacing: 0.14em;
  color: var(--ink);
}
.admin-code-input:focus {
  outline: none;
  border-color: #e3a45d;
  box-shadow: 0 0 0 3px rgba(217, 130, 43, 0.13);
}

.admin-verify-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface-2);
}
.admin-verify-row.is-match { background: #eef6ec; border-color: #cfe3cd; }
.admin-verify-row.is-mismatch { background: #fbece8; border-color: #f0cfc7; }

.admin-verify-info {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  flex: 1 1 260px;
  font-size: 13.5px;
  color: var(--ink-2);
  font-family: var(--font-num);
}
.admin-verdict {
  padding: 1px 9px;
  border-radius: 999px;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 600;
  background: #fff;
  color: var(--ink-2);
}
.is-match .admin-verdict { background: #3f7449; color: #fff; }
.is-mismatch .admin-verdict { background: #b23a28; color: #fff; }

.admin-hint {
  margin: 0;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.6;
}

.admin-item.st-verified { border-left-color: #b8661a; background: #fffdf7; }
.admin-tag.tag-pending { background: #f2ede4; color: #6d6459; }
.admin-tag.tag-sent { background: #e6eef7; color: #2f5c85; }
.admin-tag.tag-verified { background: var(--accent-soft); color: #9c570f; }
.admin-verified-stat b { color: var(--accent-deep); }


/* =========================================================
   发短信 / 显示用户填的验证码
   ========================================================= */

.admin-send-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 11px 13px;
  border-radius: 11px;
  background: var(--surface-2);
}
.admin-send-tip {
  flex: 1 1 200px;
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.6;
}

.admin-verify-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fffdf7;
}
.admin-verify-label {
  font-size: 13px;
  color: var(--muted);
}
.admin-verify-code {
  font-family: var(--font-num);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: #7d4c0e;
  user-select: all;
}
