/* ============================================================
   抽奖平台 UI v2
   C 端：国潮喜庆 · 朱红鎏金    后台：浅色卡片 · 移动优先
   ============================================================ */
* { margin: 0; padding: 0; box-sizing: border-box; }
[hidden] { display: none !important; }

:root {
  /* 国潮红金（C 端） */
  --red: #C0272D;
  --red-deep: #9A1B22;
  --red-dark: #7A1219;
  --gold: #E9B949;
  --gold-light: #F6D78A;
  --gold-pale: #FBE7A9;
  --gold-deep: #C08A24;
  --cream: #FFF8E7;
  --cream-dim: rgba(255, 240, 210, .62);

  /* 后台浅色卡片 */
  --bg: #F5F6F8;
  --card: #FFFFFF;
  --ink: #23262D;
  --ink2: #757B87;
  --line: #ECEEF2;
  --line-strong: #DDE1E6;
  --ok: #16A34A;
  --danger: #DC2626;
  --amber: #B45309;

  --radius: 16px;
  --shadow-card: 0 1px 2px rgba(16, 24, 40, .04), 0 12px 32px -12px rgba(16, 24, 40, .10);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

html, body { height: 100%; }
body {
  font-family: system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

/* ============================================================
   一、C 端转盘页 · 国潮红金
   ============================================================ */
.stage {
  min-height: 100%;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  position: relative;
  overflow-x: hidden;
  background:
    radial-gradient(120% 60% at 50% -10%, rgba(246, 215, 138, .22) 0%, transparent 55%),
    radial-gradient(90% 50% at 50% 115%, rgba(122, 18, 25, .55) 0%, transparent 60%),
    linear-gradient(172deg, #CE3038 0%, #B22330 42%, #9A1B22 78%, #8A151D 100%);
}
/* 祥云回纹暗纹 */
.stage::before {
  content: '';
  position: fixed; inset: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56'%3E%3Cg fill='none' stroke='%23F6D78A' stroke-opacity='.07' stroke-width='1.6'%3E%3Cpath d='M12 12h32v32H12z'/%3E%3Cpath d='M20 20h16v16H20z'/%3E%3Cpath d='M28 28h8v8h-8z'/%3E%3C/g%3E%3C/svg%3E");
}
.stage::after {
  content: '';
  position: fixed; left: 0; right: 0; top: 0; height: 220px;
  pointer-events: none;
  background: radial-gradient(60% 100% at 50% 0%, rgba(255, 226, 150, .18), transparent 70%);
}

.wheel-page {
  position: relative; z-index: 1;
  width: 100%; max-width: 480px;
  padding: 16px 12px calc(28px + env(safe-area-inset-bottom));
}

/* --- 灯笼装饰（布局内元素，与转盘同行，构成左右边界） --- */
.lantern {
  position: relative;
  width: clamp(36px, 11vw, 58px);
  height: clamp(68px, 21vw, 109px);
  flex-shrink: 0;
  transform-origin: 50% 0;
  animation: lantern-sway 5.2s ease-in-out infinite;
}
.lantern-a { animation-delay: 0s; }
.lantern-b { animation-delay: -2.6s; }
.lantern::before { /* 吊绳 */
  content: ''; position: absolute; left: 50%; top: 0;
  width: 2px; height: 22%; margin-left: -1px;
  background: linear-gradient(180deg, rgba(246,215,138,.0), var(--gold-light));
}
.lantern .lb {
  position: absolute; left: 50%; top: 20%; transform: translateX(-50%);
  width: 91%; height: 38%; border-radius: 50% / 46%;
  background:
    repeating-linear-gradient(90deg, transparent 0 8px, rgba(122, 18, 25, .38) 8px 9.5px),
    radial-gradient(circle at 38% 30%, #E2484F, var(--red) 58%, var(--red-deep));
  box-shadow: inset 0 -6px 12px rgba(122, 18, 25, .5), 0 6px 18px rgba(0, 0, 0, .28);
}
.lantern .lb::before, .lantern .lb::after { /* 上下金箍 */
  content: ''; position: absolute; left: 50%; transform: translateX(-50%);
  width: 45%; height: 15%; border-radius: 3px;
  background: linear-gradient(180deg, var(--gold-pale), var(--gold-deep));
}
.lantern .lb::before { top: -5%; }
.lantern .lb::after { bottom: -5%; }
.lantern .lt { /* 流苏 */
  position: absolute; left: 50%; top: 60%; transform: translateX(-50%);
  width: 16%; height: 28%; border-radius: 5px;
  background: linear-gradient(180deg, var(--gold), #D8494F 30%, #B3232C);
}
@keyframes lantern-sway {
  0%, 100% { transform: rotate(2.4deg); }
  50% { transform: rotate(-2.4deg); }
}

/* 手机端顾客页适配 */
@media (max-width: 480px) {
  .wheel-title { font-size: 26px; letter-spacing: 4px; margin: 10px 0 14px; }
  .wheel-title::before, .wheel-title::after { width: 22px; margin: 0 8px 4px; }
  .wheel-hint { font-size: 14px; margin-top: 14px; }
  .result-card { padding: 22px 18px 24px; border-radius: 16px; }
  .result-prize { font-size: 26px; margin: 14px 0 10px; }
  .code-num { font-size: 36px; letter-spacing: 8px; }
  .ribbon { padding: 6px 22px; font-size: 13px; letter-spacing: 3px; }
  .rule-note { font-size: 12px; margin-top: 16px; padding: 0 6px; }
}

/* --- 顶栏 --- */
.shop-bar {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 13px; color: var(--gold-light);
}
.shop-name {
  font-weight: 700; font-size: 15px; letter-spacing: 1px;
  color: var(--gold-pale); text-shadow: 0 1px 2px rgba(90, 10, 14, .5);
}
.shop-right { display: flex; align-items: center; gap: 8px; }
.wx-avatar {
  width: 26px; height: 26px; border-radius: 50%;
  border: 2px solid var(--gold-light);
  box-shadow: 0 1px 4px rgba(0, 0, 0, .3); object-fit: cover;
}
.shop-tag {
  background: rgba(90, 12, 17, .38);
  border: 1px solid rgba(246, 215, 138, .45);
  color: var(--gold-light);
  border-radius: 999px; padding: 4px 12px; font-size: 12px;
  backdrop-filter: blur(2px);
}

/* --- 标题 --- */
.wheel-title {
  text-align: center;
  font-family: "STKaiti", "KaiTi", "Kaiti SC", "STSong", serif;
  font-size: 36px; font-weight: 700; letter-spacing: 6px;
  color: var(--gold-light);
  text-shadow: 0 2px 0 rgba(122, 18, 25, .8), 0 4px 14px rgba(0, 0, 0, .35);
  margin: 14px 0 16px;
}
.wheel-title::before, .wheel-title::after {
  content: ''; display: inline-block; vertical-align: middle;
  width: 34px; height: 2px; margin: 0 14px 6px;
  background: linear-gradient(90deg, transparent, var(--gold));
}
.wheel-title::after {
  background: linear-gradient(90deg, var(--gold), transparent);
}

/* --- 转盘（灯笼在两侧构成边界，转盘真圆） --- */
.wheel-wrap {
  display: flex; justify-content: center; align-items: flex-start;
  gap: clamp(4px, 1.5vw, 10px);
}
.wheel-ring {
  position: relative;
  flex: 0 1 auto;
  width: 100%; max-width: 420px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: conic-gradient(from 20deg,
    #F6D78A, #C9922A 18%, #FBE7A9 36%, #B97F1F 52%,
    #F6D78A 68%, #C9922A 84%, #F6D78A);
  box-shadow:
    inset 0 0 0 5px rgba(122, 18, 25, .85),
    inset 0 0 0 8px rgba(246, 215, 138, .55),
    0 18px 44px rgba(40, 4, 7, .48),
    0 0 0 1px rgba(246, 215, 138, .35);
}
.wheel-disc {
  position: absolute; inset: 4.2%; border-radius: 50%; overflow: hidden;
  transform: rotate(0deg);
  box-shadow: inset 0 0 0 3px rgba(255, 248, 231, .65);
}
.wheel-disc canvas { display: block; width: 100%; height: 100%; border-radius: 50%; }

.wheel-pointer {
  position: absolute; left: 50%; top: -1%; transform: translateX(-50%);
  width: 0; height: 0; z-index: 3;
  border-left: clamp(9px, 3vw, 15px) solid transparent;
  border-right: clamp(9px, 3vw, 15px) solid transparent;
  border-top: clamp(18px, 6vw, 30px) solid var(--gold-light);
  filter: drop-shadow(0 3px 3px rgba(60, 6, 9, .5));
}
.wheel-pointer::after {
  content: ''; position: absolute;
  left: calc(clamp(9px, 3vw, 15px) * -0.4);
  top: calc(clamp(18px, 6vw, 30px) * -1.27);
  width: clamp(8px, 2.4vw, 12px); height: clamp(8px, 2.4vw, 12px);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--gold-pale), var(--gold-deep));
  box-shadow: 0 0 0 2px rgba(122, 18, 25, .55);
}

.wheel-go {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 24%; aspect-ratio: 1;
  min-width: 64px; max-width: 140px;
  border-radius: 50%;
  border: 4px solid #FFF3D0;
  cursor: pointer;
  background: radial-gradient(circle at 36% 28%, var(--gold-pale) 0%, var(--gold) 52%, var(--gold-deep) 100%);
  color: var(--red-dark);
  box-shadow:
    0 6px 18px rgba(40, 4, 7, .45),
    inset 0 2px 5px rgba(255, 255, 255, .75),
    inset 0 -5px 10px rgba(154, 27, 34, .25);
  transition: transform .12s var(--ease-out), box-shadow .12s;
}
.wheel-go:active { transform: translate(-50%, -50%) scale(.94); }
.wheel-go .go-main {
  display: block;
  font-family: "STKaiti", "KaiTi", "Kaiti SC", serif;
  font-size: clamp(20px, 6.4vw, 30px); font-weight: 800; letter-spacing: 5px; line-height: 1.1;
}
.wheel-go .go-sub { display: block; font-size: clamp(10px, 3vw, 12px); font-weight: 600; opacity: .72; letter-spacing: 2px; }
.wheel-go.busy {
  background: radial-gradient(circle at 36% 28%, #D8C9A3, #B8A678 60%, #9A8A5E);
  color: rgba(90, 72, 40, .8);
  box-shadow: 0 4px 12px rgba(40, 4, 7, .3), inset 0 2px 4px rgba(255, 255, 255, .4);
}

.wheel-hint {
  text-align: center; font-size: 13px; margin-top: 18px;
  color: #FFE9C0; text-shadow: 0 1px 2px rgba(90, 10, 14, .55);
  letter-spacing: 1px;
}

.my-prize-link {
  display: block; margin: 14px auto 0;
  border: 1px solid rgba(246, 215, 138, .5);
  background: rgba(90, 12, 17, .32);
  color: var(--gold-light); font-size: 13px; letter-spacing: 1px;
  padding: 7px 20px; border-radius: 999px; cursor: pointer;
  transition: background .15s;
}
.my-prize-link:hover { background: rgba(90, 12, 17, .5); }

.rule-note {
  margin: 20px auto 0; max-width: 440px; text-align: center;
  font-size: 11px; line-height: 1.8; color: var(--cream-dim);
}

/* --- 弹窗（中奖 / 记录） --- */
.mask {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(46, 7, 10, .62);
  display: flex; justify-content: center; align-items: center;
  padding: 24px;
  backdrop-filter: blur(2px);
}
.result-card {
  width: 100%; max-width: 348px;
  background: var(--cream);
  border: 2px solid var(--gold);
  border-radius: 20px;
  padding: 24px 22px 26px; text-align: center;
  box-shadow: 0 24px 60px rgba(30, 3, 5, .5), inset 0 0 0 4px rgba(233, 185, 73, .18);
  animation: pop .34s cubic-bezier(.2, .9, .3, 1.25);
}
@keyframes pop { from { transform: scale(.82); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.ribbon {
  display: inline-block;
  background: linear-gradient(180deg, #D8494F, var(--red) 60%, var(--red-deep));
  color: var(--gold-pale);
  border: 1px solid rgba(233, 185, 73, .65);
  padding: 7px 26px; border-radius: 999px;
  font-size: 14px; font-weight: 700; letter-spacing: 4px;
  box-shadow: 0 4px 12px rgba(154, 27, 34, .4);
}
.ribbon.miss { background: #9A9DA6; border-color: transparent; color: #F3F4F6; box-shadow: none; }

.result-prize {
  font-size: 30px; font-weight: 800; color: var(--red-deep);
  margin: 16px 0 12px; min-height: 40px; letter-spacing: 1px;
}
.code-box {
  background: #FFF3D6;
  border: 2px dashed var(--gold-deep);
  border-radius: 14px; padding: 14px 8px; margin: 4px 0 14px;
}
.code-label { font-size: 13px; color: #8A6A2A; }
.code-num {
  font-size: 42px; font-weight: 800; letter-spacing: 10px;
  color: var(--red-deep);
  font-family: ui-monospace, Consolas, monospace; margin: 4px 0;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .7);
}
.code-expire { font-size: 12px; color: var(--danger); }
.result-tip { font-size: 13px; color: #7A6440; margin-bottom: 16px; }

/* C 端主按钮：朱红 */
.btn-primary {
  display: inline-block; border: none; cursor: pointer;
  background: linear-gradient(180deg, #D13A41, var(--red) 55%, var(--red-deep));
  color: #FFF3D0;
  font-size: 15px; font-weight: 700; letter-spacing: 2px;
  padding: 12px 38px; border-radius: 12px;
  box-shadow: 0 5px 14px rgba(154, 27, 34, .38), inset 0 1px 0 rgba(255, 255, 255, .28);
  transition: transform .12s var(--ease-out), box-shadow .12s, filter .15s;
}
.btn-primary:hover { filter: brightness(1.06); }
.btn-primary:active { transform: scale(.97); }
.btn-primary:disabled { opacity: .5; cursor: not-allowed; }

.list-title { font-size: 17px; font-weight: 800; color: var(--red-deep); margin-bottom: 12px; letter-spacing: 1px; }
.list-body { max-height: 46vh; overflow-y: auto; text-align: left; margin-bottom: 16px; }
.list-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 11px 6px; border-bottom: 1px dashed rgba(192, 138, 36, .35); font-size: 14px;
  color: #4A3A20;
}
.list-row .lr-code {
  color: var(--red-deep); font-family: ui-monospace, monospace;
  margin-left: 8px; font-weight: 800; letter-spacing: 2px;
}
.lr-time { color: #A08C62; font-size: 12px; flex-shrink: 0; margin-left: 10px; }
.empty { color: #A08C62; font-size: 13px; text-align: center; padding: 14px 0; }

/* --- 手机浏览器「电脑版/桌面模式」兼容补偿 ---
   此类浏览器无视 viewport 声明，按 ~980px 排版再整体缩小。
   spin.js 检测到布局宽度远大于屏幕宽度时给 <html> 加 .desktop-mode，
   以下规则按 vw 放大，抵消浏览器的整体缩小。正常浏览器/微信不命中。 */
.desktop-mode .wheel-page { max-width: none; padding: 3vw 2vw calc(6vw + env(safe-area-inset-bottom)); }
.desktop-mode .shop-bar { font-size: clamp(18px, 2.8vw, 40px); }
.desktop-mode .shop-name { font-size: clamp(20px, 3.2vw, 44px); }
.desktop-mode .shop-tag { font-size: clamp(16px, 2.4vw, 34px); padding: 1vw 2.4vw; }
.desktop-mode .wx-avatar { width: 5vw; height: 5vw; }
.desktop-mode .wheel-title { font-size: clamp(44px, 7.4vw, 96px); letter-spacing: 1.2vw; margin: 2.4vw 0; }
.desktop-mode .wheel-title::before, .desktop-mode .wheel-title::after { width: 6vw; margin: 0 2vw 1vw; }
.desktop-mode .wheel-wrap { gap: 2vw; }
.desktop-mode .wheel-ring { max-width: 80vw; }
.desktop-mode .lantern { width: 9vw; height: 17vw; }
.desktop-mode .wheel-pointer {
  border-left-width: 2.6vw; border-right-width: 2.6vw; border-top-width: 5.2vw;
}
.desktop-mode .wheel-pointer::after { left: -1.05vw; top: -6.6vw; width: 2.4vw; height: 2.4vw; }
.desktop-mode .wheel-go { min-width: 0; max-width: none; border-width: .8vw; }
.desktop-mode .wheel-go .go-main { font-size: clamp(30px, 5.6vw, 76px); letter-spacing: 1vw; }
.desktop-mode .wheel-go .go-sub { font-size: clamp(14px, 2.4vw, 32px); letter-spacing: .5vw; }
.desktop-mode .wheel-hint { font-size: clamp(18px, 2.8vw, 38px); margin-top: 3vw; }
.desktop-mode .my-prize-link { font-size: clamp(18px, 2.8vw, 38px); padding: 1.4vw 4vw; margin-top: 2.4vw; }
.desktop-mode .rule-note { font-size: clamp(16px, 2.4vw, 32px); max-width: 84vw; margin-top: 3vw; }
.desktop-mode .result-card { max-width: 84vw; padding: 4vw 4vw 5vw; border-radius: 3.6vw; }
.desktop-mode .ribbon { font-size: clamp(18px, 3vw, 42px); padding: 1.4vw 5vw; letter-spacing: 1vw; }
.desktop-mode .result-prize { font-size: clamp(32px, 6.2vw, 82px); }
.desktop-mode .code-box { padding: 2.6vw 2vw; border-radius: 2.6vw; }
.desktop-mode .code-label { font-size: clamp(16px, 2.6vw, 36px); }
.desktop-mode .code-num { font-size: clamp(42px, 8.6vw, 110px); letter-spacing: 2vw; }
.desktop-mode .code-expire { font-size: clamp(15px, 2.4vw, 32px); }
.desktop-mode .result-tip { font-size: clamp(16px, 2.6vw, 36px); }
.desktop-mode .result-card .btn-primary { font-size: clamp(18px, 3.2vw, 44px); padding: 2.4vw 8vw; border-radius: 2.4vw; }
.desktop-mode .list-title { font-size: clamp(20px, 3.6vw, 48px); }
.desktop-mode .list-row { font-size: clamp(17px, 3vw, 40px); }
.desktop-mode .lr-time { font-size: clamp(14px, 2.4vw, 32px); }
.desktop-mode .empty { font-size: clamp(16px, 2.8vw, 36px); }

/* ============================================================
   二、店员后台 · 浅色卡片（移动优先）
   ============================================================ */
.admin-body { background: var(--bg); }

/* --- 登录 --- */
.login-panel {
  max-width: 340px; margin: 14vh auto 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px; padding: 32px 26px; text-align: center;
  box-shadow: var(--shadow-card);
  position: relative; overflow: hidden;
}
.login-panel::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, var(--red-deep), var(--red), var(--gold));
}
.login-panel h1 {
  font-size: 22px; font-weight: 800; letter-spacing: 2px; margin-bottom: 6px;
}
.login-sub { color: var(--ink2); font-size: 13px; margin-bottom: 20px; }
.login-panel .input { text-align: center; margin-bottom: 14px; }
.login-panel .btn-primary { width: 100%; padding: 12px; }
.login-msg { color: var(--danger); font-size: 13px; margin-top: 12px; min-height: 18px; }

/* --- 顶栏 --- */
.admin-app { max-width: 1080px; margin: 0 auto; padding: 0 14px 48px; }
.admin-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(245, 246, 248, .88);
  backdrop-filter: blur(8px);
  padding: 12px 0 10px;
  border-bottom: 1px solid var(--line);
}
.ah-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.ah-top b { font-size: 17px; font-weight: 800; letter-spacing: .5px; }
.ah-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

.tabs {
  display: flex; gap: 4px; margin-top: 12px;
  background: #E9EBEF; border-radius: 999px; padding: 4px;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
}
.tab {
  flex: 1; white-space: nowrap;
  border: none; background: transparent; cursor: pointer;
  font-size: 14px; color: var(--ink2);
  padding: 8px 16px; border-radius: 999px;
  transition: background .15s, color .15s;
}
.tab.active {
  background: var(--card); color: var(--red-deep); font-weight: 700;
  box-shadow: 0 1px 4px rgba(16, 24, 40, .12);
}

.btn-ghost {
  border: 1px solid var(--line-strong); background: var(--card); cursor: pointer;
  font-size: 13px; color: var(--ink2); padding: 7px 14px; border-radius: 10px;
  transition: border-color .15s, color .15s;
}
.btn-ghost:hover { border-color: var(--red); color: var(--red-deep); }
.btn-danger {
  border: 1px solid #FECACA; background: #FEF2F2; color: var(--danger);
  cursor: pointer; font-size: 13px; padding: 9px 16px; border-radius: 10px;
}

/* --- 卡片面板 --- */
.admin-grid { margin-top: 16px; }
.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px 16px 22px;
  box-shadow: var(--shadow-card);
}
@media (min-width: 720px) { .panel { padding: 24px 26px 28px; } }
.panel h2 {
  font-size: 17px; font-weight: 800; margin-bottom: 14px;
  position: relative; padding-left: 12px; letter-spacing: .5px;
}
.panel h2::before {
  content: ''; position: absolute; left: 0; top: 3px; bottom: 3px;
  width: 4px; border-radius: 2px;
  background: linear-gradient(180deg, var(--red), var(--gold));
}
.panel h3 { font-size: 14px; font-weight: 700; margin: 20px 0 10px; color: var(--ink2); }

/* --- 表单 --- */
.input {
  border: 1px solid var(--line-strong); border-radius: 10px;
  padding: 10px 13px; font-size: 14px; width: 100%;
  outline: none; background: #fff; color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
.input:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(192, 39, 45, .12);
}
.input.big {
  font-size: 22px; letter-spacing: 4px; text-align: center;
  font-family: ui-monospace, Consolas, monospace; font-weight: 700;
}
@media (max-width: 480px) {
  .input.big { font-size: 17px; letter-spacing: 2px; }
}
.input.mini { padding: 6px 9px; font-size: 13px; width: auto; }
.input.num { width: 64px; }
label { font-size: 13px; color: var(--ink2); display: block; font-weight: 600; }
label .input { margin-top: 6px; font-weight: 400; }

.tip { font-size: 13px; color: var(--ink2); margin-top: 10px; min-height: 18px; line-height: 1.6; }
.tip.good { color: var(--ok); font-weight: 600; }
.tip.bad { color: var(--danger); font-weight: 600; }
.count-pill { color: var(--red-deep); font-weight: 800; }
.save-msg { font-size: 13px; color: var(--ok); margin-left: 12px; font-weight: 600; }

/* --- 核销 --- */
.verify-row { display: flex; gap: 10px; align-items: stretch; }
.verify-row .input.big { flex: 1; min-width: 0; }
.verify-row .btn-primary { padding: 0 28px; flex-shrink: 0; letter-spacing: 4px; }

.pending-list, .recent-list { display: flex; flex-direction: column; gap: 8px; }
.prow, .rrow {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 6px;
  border: 1px solid var(--line); border-radius: 12px;
  padding: 10px 13px; font-size: 13px; background: #FBFBFC;
}
.prow-main { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.prow-main b {
  font-size: 19px; font-family: ui-monospace, Consolas, monospace;
  color: var(--red-deep); letter-spacing: 2px;
}
.prow-main em { font-style: normal; color: var(--ink2); }
.who-avatar { width: 20px; height: 20px; border-radius: 50%; object-fit: cover; }
.who-name { font-style: normal; color: var(--ink2); font-size: 12px; }
.rr-who {
  font-style: normal; color: var(--ink2); font-size: 12px;
  margin-left: 8px; background: #F1F2F4; padding: 1px 8px; border-radius: 999px;
}
.rrow .rr-name { font-weight: 700; }
.rrow .rr-code { color: var(--ink2); font-family: ui-monospace, monospace; margin-left: 8px; }
.rr-time { margin-left: auto; color: var(--ink2); font-style: normal; font-size: 12px; }

.st { font-size: 12px; padding: 2px 9px; border-radius: 999px; margin-left: 8px; font-weight: 600; }
.st.ok { background: #DCFCE7; color: #15803D; }
.st.pending { background: #FEF3C7; color: var(--amber); }
.st.expired { background: #FEE2E2; color: #B91C1C; }
.st.miss { background: #F1F2F4; color: var(--ink2); }

.btn-tiny {
  border: 1px solid var(--line-strong); background: #fff; cursor: pointer;
  font-size: 12px; padding: 4px 12px; border-radius: 8px; color: var(--ink2);
  transition: border-color .15s, color .15s;
}
.btn-tiny:hover { border-color: var(--red); color: var(--red-deep); }
.verify-id {
  border-color: rgba(192, 39, 45, .35); color: var(--red-deep);
  background: rgba(192, 39, 45, .06); font-weight: 700;
}

/* --- 奖品配置 --- */
.col-split { display: grid; grid-template-columns: 1fr; gap: 22px; align-items: start; }
@media (min-width: 960px) { .col-split { grid-template-columns: 1fr 310px; gap: 28px; } }
.col-main { min-width: 0; }

.table-scroll {
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line); border-radius: 12px;
}
.prize-table { width: 100%; min-width: 620px; border-collapse: collapse; font-size: 13px; }
.prize-table th {
  text-align: left; color: var(--ink2); font-weight: 600; font-size: 12px;
  padding: 10px 8px; border-bottom: 1px solid var(--line); background: #FAFAFB;
  white-space: nowrap;
}
.prize-table td { padding: 8px; border-bottom: 1px solid #F2F3F5; vertical-align: middle; }
.prize-table tr:last-child td { border-bottom: none; }
.prize-table input[type=color] {
  width: 38px; height: 28px; border: 1px solid var(--line); padding: 0;
  cursor: pointer; background: none; border-radius: 8px;
}
.prize-table .stock-cell b { font-size: 15px; margin-right: 8px; }
.prize-table .stock-cell { white-space: nowrap; }
.pct-cell { color: var(--ink2); font-size: 12px; font-weight: 600; white-space: nowrap; }
.row-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.row-actions .btn-primary { padding: 10px 26px; letter-spacing: 1px; }
.actions-line h3 { color: var(--ink2); font-weight: 400; font-size: 12px; }

.pie-box { width: 100%; max-width: 300px; margin: 0 auto 10px; aspect-ratio: 1; }
.pie-box canvas { display: block; }
.pie-legend { display: flex; flex-direction: column; gap: 5px; max-height: 220px; overflow-y: auto; }
.legend-row {
  display: flex; align-items: center; gap: 8px; font-size: 12px;
  justify-content: space-between; padding: 3px 2px;
}
.legend-row i { width: 12px; height: 12px; border-radius: 4px; display: inline-block; flex-shrink: 0; }
.legend-row span { color: var(--ink2); }
.legend-row b { font-weight: 700; }

/* --- 数据看板 --- */
.metric-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 20px; }
@media (min-width: 640px) { .metric-row { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1000px) { .metric-row { grid-template-columns: repeat(6, 1fr); } }
.metric {
  background: #F7F8FA; border: 1px solid var(--line);
  border-radius: 14px; padding: 14px 10px; text-align: center;
}
.metric p { font-size: 12px; color: var(--ink2); margin-bottom: 5px; }
.metric b { font-size: 24px; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }

.form-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 640px) { .form-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .form-grid { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); } }

.danger-zone { color: var(--danger) !important; }
.danger-actions { margin-top: 4px; }

/* --- 门店台卡二维码弹窗 --- */
.qr-card { max-width: 380px; background: var(--card); border: 1px solid var(--line); box-shadow: 0 24px 60px rgba(16, 24, 40, .3); }
.qr-card .list-title { color: var(--ink); }
.qr-box {
  display: flex; justify-content: center; margin: 4px 0 12px;
  padding: 12px; background: #fff; border: 1px solid var(--line); border-radius: 12px;
}
.qr-box canvas, .qr-box img { width: 240px; height: 240px; }
.qr-url {
  word-break: break-all; color: var(--red-deep); font-size: 13px; font-weight: 700;
  margin: 0 0 10px; background: rgba(192, 39, 45, .06); padding: 8px 12px; border-radius: 10px;
}
.qr-tip { font-size: 13px; color: var(--ink2); margin-bottom: 14px; line-height: 1.7; }
.qr-warn { font-size: 12px; color: var(--danger); margin-top: 12px; white-space: pre-line; line-height: 1.7; }
.qr-actions { display: flex; justify-content: center; gap: 10px; }

/* --- 后台里的空态文案 --- */
.admin-body .empty { color: var(--ink2); }

/* --- 后台桌面模式补偿：admin.js 整体 zoom，媒体查询仍按真实视口判定，强制回单列 --- */
.desktop-mode .admin-app { max-width: none; }
.desktop-mode .col-split { grid-template-columns: 1fr; }
.desktop-mode .metric-row { grid-template-columns: repeat(2, 1fr); }
.desktop-mode .form-grid { grid-template-columns: 1fr; }

/* --- 动效降级 --- */
@media (prefers-reduced-motion: reduce) {
  .lantern { animation: none; }
  .result-card { animation: none; }
}
