/* ============================================================
   校园奖品核销系统 样式表
   ============================================================ */
@font-face {
  font-family: "Bricolage";
  src: url("../assets/fonts/BricolageGrotesque-Regular.ttf") format("truetype");
  font-weight: 400; font-display: swap;
}
@font-face {
  font-family: "Bricolage";
  src: url("../assets/fonts/BricolageGrotesque-Bold.ttf") format("truetype");
  font-weight: 700; font-display: swap;
}
@font-face {
  font-family: "JBMono";
  src: url("../assets/fonts/JetBrainsMono-Regular.ttf") format("truetype");
  font-weight: 400; font-display: swap;
}
@font-face {
  font-family: "JBMono";
  src: url("../assets/fonts/JetBrainsMono-Bold.ttf") format("truetype");
  font-weight: 700; font-display: swap;
}

:root {
  --ink: #141413;          /* 主文本 / 深色面板 */
  --ink-2: #3d3c38;        /* 次级文本 */
  --mid: #b0aea5;          /* 弱化文本 / 描边辅助 */
  --paper: #faf9f5;        /* 页面底色 */
  --card: #ffffff;         /* 卡片 */
  --subtle: #e8e6dc;       /* 描边 / 分隔 */
  --subtle-2: #f1efe8;     /* 更浅填充 */
  --accent: #d97757;       /* 唯一强调色（暖橙） */
  --accent-ink: #b85c3e;   /* 强调色 hover 深 */
  --accent-soft: #f7e8e0;  /* 强调色浅底 */
  --ok: #788c5d;           /* 语义：成功/已核销 */
  --ok-soft: #eef1e6;
  --danger: #b3402a;       /* 语义：危险/错误 */
  --danger-soft: #f8e9e4;
  --info: #6a9bcc;         /* 语义：信息（少量使用） */
  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(20, 20, 19, .04), 0 10px 34px -14px rgba(20, 20, 19, .14);
  --shadow-pop: 0 2px 4px rgba(20,20,19,.05), 0 24px 60px -18px rgba(20,20,19,.28);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --font-display: "Bricolage", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-body: "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
  --font-mono: "JBMono", "SFMono-Regular", Consolas, monospace;
  --rail-w: 224px;
}

* { margin: 0; padding: 0; box-sizing: border-box; scrollbar-width: thin; scrollbar-color: rgba(20, 20, 19, 0.18) transparent; }
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(20, 20, 19, 0.18); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: rgba(20, 20, 19, 0.32); }
html, body { height: 100%; }
body {
  font-family: var(--font-body);
  background: var(--paper); color: var(--ink);
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
  font-size: 14px; line-height: 1.55;
}
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select { font-family: inherit; }
img { display: block; }
.mono { font-family: var(--font-mono); }

/* ---------------- 路由切换 / 列表动画 ---------------- */
.page-enter-active { transition: opacity .32s var(--ease-out), transform .32s var(--ease-out); }
.page-enter-from { opacity: 0; transform: translateY(10px); }
.page-leave-active { transition: opacity .14s ease; }
.page-leave-to { opacity: 0; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
.stagger > * { animation: rise .55s var(--ease-out) backwards; animation-delay: calc(var(--i, 0) * 60ms); }
@keyframes popIn { from { opacity: 0; transform: translateY(-6px) scale(.98); } }
@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes breathe { 0%,100% { transform: scale(1); opacity: .75; } 50% { transform: scale(1.06); opacity: 1; } }
@keyframes drift { 0% { transform: translate(0,0) scale(1); } 50% { transform: translate(3vw,-4vh) scale(1.12); } 100% { transform: translate(-2vw,3vh) scale(.94); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes drawCheck { from { stroke-dashoffset: 30; } to { stroke-dashoffset: 0; } }

/* ================= 居中登录页（默认亮主题 + 彩色亚克力动态光晕） ================= */
.login-wrap {
  min-height: 100dvh;
  width: 100%;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8f6f0;
  color: var(--ink);
  padding: 24px;
}

/* 1. 微点阵纹理底 */
.login-bg-grid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(20, 20, 19, 0.05) 1.2px, transparent 1.2px);
  background-size: 30px 30px;
  pointer-events: none;
  z-index: 1;
}

/* 2. 彩色亚克力弥散动态光晕 */
.acrylic-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(85px);
  -webkit-filter: blur(85px);
  pointer-events: none;
  will-change: transform, opacity;
  z-index: 2;
}

/* 珊瑚暖橙光晕 */
.orb-coral {
  width: 540px;
  height: 540px;
  background: radial-gradient(circle, rgba(242, 114, 84, 0.42) 0%, rgba(255, 160, 122, 0.22) 50%, transparent 72%);
  top: -8%;
  left: 8%;
  animation: orbDriftA 20s ease-in-out infinite alternate;
}

/* 梦幻丁香紫光晕 */
.orb-violet {
  width: 580px;
  height: 580px;
  background: radial-gradient(circle, rgba(158, 128, 247, 0.36) 0%, rgba(196, 181, 253, 0.18) 50%, transparent 72%);
  top: -10%;
  right: 6%;
  animation: orbDriftB 24s ease-in-out infinite alternate;
}

/* 晨曦金杏光晕 */
.orb-amber {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(251, 191, 36, 0.38) 0%, rgba(253, 230, 138, 0.18) 50%, transparent 72%);
  bottom: -10%;
  left: 12%;
  animation: orbDriftC 22s ease-in-out infinite alternate;
}

/* 碧海天青薄荷光晕 */
.orb-cyan {
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.34) 0%, rgba(94, 234, 212, 0.2) 50%, transparent 72%);
  bottom: -8%;
  right: 10%;
  animation: orbDriftD 26s ease-in-out infinite alternate;
}

/* 核心棱镜漫射（居中轻微呼吸） */
.orb-core {
  width: 440px;
  height: 440px;
  background: radial-gradient(circle, rgba(244, 114, 182, 0.24) 0%, rgba(251, 146, 60, 0.18) 45%, transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: orbCorePulse 10s ease-in-out infinite alternate;
}

@keyframes orbDriftA {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(70px, 50px) scale(1.16); }
  100% { transform: translate(-40px, 90px) scale(0.92); }
}

@keyframes orbDriftB {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-90px, 60px) scale(1.18); }
  100% { transform: translate(40px, -60px) scale(0.88); }
}

@keyframes orbDriftC {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(60px, -70px) scale(1.12); }
  100% { transform: translate(-50px, -40px) scale(0.94); }
}

@keyframes orbDriftD {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-60px, -50px) scale(1.2); }
  100% { transform: translate(50px, 40px) scale(0.9); }
}

@keyframes orbCorePulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.6; }
  50% { transform: translate(-50%, -50%) scale(1.24); opacity: 0.95; }
}

/* 3. 居中彩色亚克力磨砂卡片（Acrylic Frosted Slab） */
.login-card {
  position: relative;
  z-index: 10;
  width: 420px;
  max-width: 100%;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(36px) saturate(190%);
  -webkit-backdrop-filter: blur(36px) saturate(190%);
  border: 1.5px solid rgba(255, 255, 255, 0.88);
  border-radius: 28px;
  padding: 38px 34px;
  box-shadow:
    0 24px 60px -12px rgba(45, 35, 25, 0.12),
    0 8px 20px -4px rgba(45, 35, 25, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    inset 0 -1px 0 rgba(255, 255, 255, 0.4);
  animation: popIn 0.5s var(--ease-out) backwards;
}

/* ================= 通用表单与输入框（模态框弹窗、登录卡片、常规表单） ================= */
.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 18px;
  text-align: left;
}
.field label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  letter-spacing: .02em;
}
.control {
  position: relative;
  width: 100%;
}
.control input,
.field input {
  width: 100%;
  height: 46px;
  border: 1.5px solid rgba(20, 20, 19, 0.14);
  border-radius: var(--radius-sm);
  padding: 0 14px 0 42px;
  font-size: 13.5px;
  outline: none;
  background: #ffffff;
  color: var(--ink);
  transition: border-color .18s, box-shadow .18s, background .18s;
  box-sizing: border-box;
}
.control input:not(:disabled):hover,
.field input:not(:disabled):hover {
  border-color: var(--mid);
}
.control input::placeholder,
.field input::placeholder {
  color: #a8a69d;
  font-size: 13px;
}
.control input:focus,
.field input:focus {
  background: #ffffff;
  border-color: var(--accent);
  box-shadow: 0 0 0 3.5px rgba(217, 119, 87, 0.18);
}
.control input:disabled,
.field input:disabled {
  background: #f6f5ef;
  color: var(--mid);
  cursor: not-allowed;
  border-color: #e2decb;
}
.control .lead {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 17px;
  height: 17px;
  color: var(--mid);
  pointer-events: none;
  transition: color .18s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.control .lead svg {
  width: 100%;
  height: 100%;
}
.control input:focus ~ .lead {
  color: var(--accent);
}
.control input.mono-input,
.field input.mono-input {
  font-family: var(--font-mono);
  letter-spacing: .04em;
}

/* 按钮 */
.login-card .btn-login {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 48px;
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 14.5px;
  font-weight: 700;
  background: linear-gradient(135deg, #d97757 0%, #c45d3c 100%);
  transition: transform .16s var(--ease-out), box-shadow .16s;
  box-shadow: 0 10px 24px -5px rgba(217, 119, 87, 0.42);
  margin-top: 6px;
}
.login-card .btn-login:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px -5px rgba(217, 119, 87, 0.58);
}
.login-card .btn-login:active:not(:disabled) {
  transform: scale(.985);
}
.login-card .btn-login:disabled {
  opacity: .6;
  cursor: not-allowed;
}

/* 错误提示 */
.form-error {
  display: flex; gap: 9px; align-items: center; background: var(--danger-soft); color: var(--danger);
  border: 1px solid #ecd2c8; font-size: 13px; padding: 10px 13px; border-radius: var(--radius-sm); margin-bottom: 16px;
}

.shake { animation: shake .45s; }
@keyframes shake { 0%,100%{transform:translateX(0)} 20%{transform:translateX(-7px)} 40%{transform:translateX(7px)} 60%{transform:translateX(-4px)} 80%{transform:translateX(4px)} }

@media (max-width: 480px) {
  .login-card { padding: 30px 22px; border-radius: 24px; }
  .acrylic-orb { filter: blur(60px); -webkit-filter: blur(60px); }
  .orb-coral, .orb-violet, .orb-amber, .orb-cyan { width: 360px; height: 360px; }
}

/* ================= 主布局 ================= */
.layout { display: flex; min-height: 100dvh; }
.rail {
  width: var(--rail-w); position: fixed; inset: 0 auto 0 0; z-index: 50;
  background: var(--ink); color: #c9c7bc; display: flex; flex-direction: column;
  transition: transform .3s var(--ease-out);
}
.rail .brandmark { display: flex; align-items: center; gap: 10px; padding: 22px 18px 16px; }
.rail .brandmark .t { color: #f5f3ec; font-size: 15px; }
.rail-backdrop { display: none; }
.rail-close-btn { display: none; }
.nav { flex: 1; padding: 8px 12px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  display: flex; align-items: center; gap: 11px; width: 100%; padding: 10px 12px;
  border-radius: 11px; font-size: 13.5px; font-weight: 500; color: #a9a79b;
  transition: background .16s, color .16s; position: relative; text-align: left;
}
.nav-item svg { width: 17px; height: 17px; flex: none; }
.nav-item:hover { background: rgba(255,255,255,.06); color: #f0eee4; }
.nav-item.active { background: var(--accent); color: #fff; font-weight: 600; box-shadow: 0 8px 20px -8px rgba(217,119,87,.6); }
.rail-foot { padding: 12px; border-top: 1px solid rgba(255,255,255,.08); display: flex; flex-direction: column; gap: 2px; }
.main { flex: 1; margin-left: var(--rail-w); display: flex; flex-direction: column; min-width: 0; }
.topbar {
  height: 62px; background: rgba(250,249,245,.86); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--subtle); display: flex; align-items: center; gap: 12px;
  padding: 0 28px; position: sticky; top: 0; z-index: 40;
}
.topbar h1 { font-family: var(--font-display); font-size: 18px; font-weight: 700; letter-spacing: -.01em; flex: 1; }
.chip {
  display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--subtle);
  background: #fff; border-radius: 999px; padding: 5px 12px; font-size: 12.5px; font-weight: 500;
}
.chip svg { width: 14px; height: 14px; color: var(--mid); }
.user-chip { padding: 4px 12px 4px 5px; }
.avatar {
  width: 32px; height: 32px; border-radius: 50%; background: var(--ink); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; flex: none;
  overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.sm { width: 26px; height: 26px; font-size: 11px; }
.user-chip .nm { font-size: 12.5px; font-weight: 700; line-height: 1.2; }
.user-chip .no { font-size: 10.5px; color: var(--mid); font-family: var(--font-mono); }
.content { padding: 28px; width: 100%; max-width: 1160px; margin: 0 auto; flex: 1; }

/* 徽章 */
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; padding: 3px 10px; border-radius: 999px; white-space: nowrap; letter-spacing: .02em; }
.badge svg { width: 12px; height: 12px; }
.b-superadmin { background: var(--accent-soft); color: var(--accent-ink); }
.b-admin { background: #e8eff7; color: #44708f; }
.b-employee { background: var(--ok-soft); color: #5a6b44; }
.b-gray { background: var(--subtle-2); color: var(--ink-2); }
.b-ok { background: var(--ok-soft); color: var(--ok); }
.b-danger { background: var(--danger-soft); color: var(--danger); }
.b-accent { background: var(--accent-soft); color: var(--accent-ink); }
.b-ink { background: var(--ink); color: #fff; }

/* ================= 规范卡片 4 层设计结构 =================
   第 1 行：<卡片标题>（第一行只有标题，当超出卡片范围添加 "..."，且 "..." 绝不超出卡片范围）
   第 2 行：<搜索框/筛选> <刷新>...（第二行操作区，超出卡片范围自适应折行解决）
   第 3 行：<表格内容>（电子表格容器，平滑横向滚动，永不撑破卡片）
   第 4 行：<----置后----->换页选项（居右置底对齐）
========================================================== */
.card {
  background: var(--card);
  border: 1px solid var(--subtle);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}
.card + .card { margin-top: 18px; }

/* 1. 第一行：卡片标题行（第一行只有标题） */
.card-title-row {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  margin-bottom: 14px;
}

.card-title,
.card-title-row h2,
.card-head h2 {
  margin: 0;
  padding: 0;
  font-family: var(--font-display);
  font-size: 16.5px;
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--ink);
  line-height: 1.4;
  /* 第一行只有标题，超出卡片范围添加 "..."，且 "..." 绝不能超出卡片范围 */
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  box-sizing: border-box !important;
}

/* 2. 第二行：搜索框 / 筛选 / 刷新等操作区（超出卡片范围自适应折行解决） */
.card-toolbar-row,
.card-head .toolbar,
.toolbar {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 10px !important;
  flex-wrap: wrap !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
  margin-bottom: 14px !important;
  margin-left: 0 !important;
}

/* 兼容 .card-head：强制上下两行排列 */
.card-head {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 12px !important;
  margin-bottom: 16px !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
}
.card-head > h2,
.card-head > .card-title,
.card-head > .card-title-row {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  flex: none !important;
}
.card-head > .toolbar,
.card-head > .card-toolbar-row {
  display: flex !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  flex: none !important;
  margin-left: 0 !important;
}

.card-head .desc {
  font-size: 12.5px;
  color: var(--mid);
  margin-top: -4px;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.search-box {
  position: relative;
  max-width: 100%;
  box-sizing: border-box;
}
.search-box input {
  height: 38px;
  width: 240px;
  max-width: 100%;
  border: 1.5px solid var(--subtle);
  border-radius: 10px;
  padding: 0 12px 0 34px;
  font-size: 13px;
  outline: none;
  background: #fff;
  transition: border-color .16s, box-shadow .16s;
  box-sizing: border-box;
}
.search-box input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.search-box svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--mid); }
/* ================= Excel / XLSX 风格电子表格（永不分行、平滑左右滑动） ================= */
.tbl-sheet-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  border: 1px solid #e3decb;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 2px 8px -2px rgba(45, 35, 25, 0.04);
  margin-top: 10px;
  margin-bottom: 14px;
  position: relative;
}

/* Excel 风格水平滚动条 */
.tbl-sheet-wrap::-webkit-scrollbar {
  height: 8px;
  width: 8px;
}
.tbl-sheet-wrap::-webkit-scrollbar-track {
  background: #f7f5ed;
  border-radius: 0 0 11px 11px;
}
.tbl-sheet-wrap::-webkit-scrollbar-thumb {
  background: #d5d0bf;
  border-radius: 4px;
  border: 2px solid #f7f5ed;
}
.tbl-sheet-wrap::-webkit-scrollbar-thumb:hover {
  background: #b6af9a;
}

/* 表格本体：保底最小宽度 720px，绝不挤压变形 */
.tbl {
  width: 100%;
  min-width: 720px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
  text-align: left;
}

/* 严格防折行：所有表头与单元格无论屏幕多小都保持单行 */
.tbl th,
.tbl td,
.tbl th *,
.tbl td * {
  white-space: nowrap !important;
}

/* XLSX 表头（经典浅暖灰网格顶栏 + 吸顶） */
.tbl th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f8f6f0;
  color: var(--ink-2);
  font-weight: 700;
  font-size: 11.5px;
  letter-spacing: .04em;
  padding: 10px 16px;
  border-bottom: 1.5px solid #dad4c3;
  border-right: 1px solid #eae4d5;
  user-select: none;
}
.tbl th:last-child {
  border-right: none;
}

/* XLSX 数据单元格（清爽网格线、舒适间距、垂直居中） */
.tbl td {
  padding: 12px 16px;
  border-bottom: 1px solid #eeece3;
  border-right: 1px solid #f3f0e8;
  vertical-align: middle;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  transition: background .12s ease;
}
.tbl td:last-child {
  border-right: none;
}

/* Excel 经典斑马交替底色与整行悬停高亮 */
.tbl tbody tr:nth-child(even) td {
  background: #faf9f5;
}
.tbl tbody tr:hover td {
  background: #f2eee2 !important;
}
.tbl tbody tr:last-child td {
  border-bottom: none;
}

/* 操作列（统一左对齐，与全表表头对齐，不再被右置推至末尾） */
.tbl .actions {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

/* 移动端/小屏滑动提示标签 */
.table-scroll-hint {
  display: none;
}
@media (max-width: 768px) {
  .table-scroll-hint {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: var(--mid);
    background: #f1eee4;
    border: 1px solid #e2ddd0;
    padding: 2px 8px;
    border-radius: 999px;
    font-weight: 500;
  }
}

/* 按钮 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 38px; padding: 0 16px; border-radius: 10px; font-size: 13px; font-weight: 600; transition: transform .14s var(--ease-out), background .14s, box-shadow .14s, border-color .14s; white-space: nowrap; }
.btn svg { width: 15px; height: 15px; }
.btn:active:not(:disabled) { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 8px 20px -8px rgba(217,119,87,.55); }
.btn-primary:hover:not(:disabled) { background: var(--accent-ink); transform: translateY(-1px); }
.btn-ink { background: var(--ink); color: #fff; }
.btn-ink:hover:not(:disabled) { background: #26251f; transform: translateY(-1px); }
.btn-ghost { background: #fff; color: var(--ink-2); border: 1.5px solid var(--subtle); }
.btn-ghost:hover:not(:disabled) { border-color: var(--mid); color: var(--ink); }
.btn-danger { background: var(--danger-soft); color: var(--danger); }
.btn-danger:hover:not(:disabled) { background: #f3dcd4; }
.btn-sm { height: 31px; padding: 0 11px; font-size: 12px; border-radius: 8px; }

/* 核销台 */
.verify-hero { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: end; }
.uid-input-wrap { position: relative; }
.uid-input-wrap .lead { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--mid); pointer-events: none; }
.uid-input-wrap input {
  width: 100%; height: 56px; border: 1.5px solid var(--subtle); border-radius: 14px;
  padding: 0 14px 0 45px; font-family: var(--font-mono); font-size: 19px; letter-spacing: .06em;
  outline: none; background: #fff; transition: border-color .18s, box-shadow .18s;
}
.uid-input-wrap input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.uid-input-wrap input::placeholder { font-family: var(--font-body); font-size: 14px; letter-spacing: 0; color: var(--mid); }
.verify-go { height: 56px; padding: 0 26px; font-size: 14.5px; border-radius: 14px; }
.customer-card { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.customer-card .who { display: flex; align-items: center; gap: 12px; }
.customer-card .nick { font-family: var(--font-display); font-size: 17px; font-weight: 700; }
.customer-card .uidline { font-size: 12px; color: var(--mid); font-family: var(--font-mono); }
.mini-stats { display: flex; gap: 8px; margin-left: auto; flex-wrap: wrap; }
.stat-pill { background: var(--subtle-2); border-radius: 999px; padding: 6px 14px; font-size: 12px; color: var(--ink-2); display: flex; flex-direction: column; align-items: center; min-width: 72px; }
.stat-pill b { font-family: var(--font-display); font-size: 17px; color: var(--ink); }
.prize-row {
  display: flex; align-items: center; gap: 14px; padding: 14px; border: 1px solid var(--subtle);
  border-radius: 16px; margin-bottom: 10px; background: #fff; position: relative;
  transition: border-color .18s, box-shadow .18s, transform .18s;
}
.prize-row:hover { border-color: var(--mid); box-shadow: var(--shadow); }
.prize-row.just-verified { border-color: var(--ok); background: #fbfcf8; animation: popIn .35s var(--ease-spring); }
tr.just-verified { background: #f0f7ea !important; animation: popIn .35s var(--ease-spring); }
.prize-thumb {
  width: 48px; height: 48px; border-radius: 12px; background: var(--subtle-2);
  display: flex; align-items: center; justify-content: center; flex: none; overflow: hidden;
}
.prize-thumb img { width: 100%; height: 100%; object-fit: cover; }
.prize-thumb svg { width: 22px; height: 22px; color: var(--mid); }
.prize-info { flex: 1; min-width: 0; }
.prize-name { font-weight: 700; font-size: 14.5px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.prize-meta { font-size: 12px; color: var(--mid); margin-top: 3px; display: flex; gap: 10px; flex-wrap: wrap; }
.verified-box { text-align: right; }
.verified-box .when { font-size: 11px; color: var(--mid); margin-top: 3px; }

/* 获奖名单 */
.act-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.act-card {
  text-align: left; background: #fff; border: 1px solid var(--subtle); border-radius: 18px; padding: 20px;
  transition: transform .2s var(--ease-out), box-shadow .2s, border-color .2s; position: relative; overflow: hidden;
}
.act-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-pop); border-color: var(--mid); }
.act-card .top { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.act-card .ic { width: 38px; height: 38px; border-radius: 11px; background: var(--accent-soft); color: var(--accent-ink); display: flex; align-items: center; justify-content: center; flex: none; }
.act-card .ic svg { width: 18px; height: 18px; }
.act-card h3 { font-family: var(--font-display); font-size: 16px; font-weight: 700; letter-spacing: -.01em; }
.act-card .meta { display: flex; gap: 6px; flex-wrap: wrap; }
.act-card .go { position: absolute; right: 18px; bottom: 16px; width: 30px; height: 30px; border-radius: 9px; background: var(--ink); color: #fff; display: flex; align-items: center; justify-content: center; transition: transform .2s var(--ease-spring); }
.act-card:hover .go { transform: translateX(3px); }
.act-card .go svg { width: 14px; height: 14px; }
.back-link { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: var(--ink-2); padding: 7px 13px; border-radius: 999px; border: 1.5px solid var(--subtle); background: #fff; transition: all .16s; }
.back-link:hover { border-color: var(--ink); color: var(--ink); transform: translateX(-2px); }
.back-link svg { width: 14px; height: 14px; }

/* 空状态 / 骨架 / 分页 */
.empty { text-align: center; padding: 52px 20px; color: var(--ink-2); }
.empty .ico { width: 68px; height: 68px; margin: 0 auto 16px; border-radius: 50%; border: 1.5px dashed var(--mid); display: flex; align-items: center; justify-content: center; background: #fff; }
.empty .ico svg { width: 28px; height: 28px; color: var(--mid); }
.empty .t { font-family: var(--font-display); font-size: 15.5px; font-weight: 700; color: var(--ink); }
.empty .s { font-size: 12.5px; color: var(--mid); margin-top: 5px; }
.pager {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-end;
  margin-top: auto;
  padding-top: 14px;
  font-size: 12.5px;
  color: var(--ink-2);
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  flex-wrap: wrap;
}

/* 模态框 */
.modal-mask {
  position: fixed; inset: 0; background: rgba(20,20,19,.52);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  z-index: 1000; display: flex; align-items: center; justify-content: center;
  padding: 24px 16px; overflow-y: auto; -webkit-overflow-scrolling: touch;
}
.modal {
  background: #fff; border-radius: 20px; width: 440px; max-width: 100%;
  box-shadow: 0 24px 60px -10px rgba(20, 20, 19, 0.28), 0 0 0 1px rgba(20, 20, 19, 0.06);
  position: relative; margin: auto;
  overflow: visible; /* 允许下拉框自然浮出，彻底消除弹窗侧边滑动条 */
}
.modal-head { display: flex; align-items: center; padding: 22px 24px 0; }
.modal-head h3 { font-family: var(--font-display); font-size: 17.5px; font-weight: 700; flex: 1; letter-spacing: -.01em; }
.modal-x { width: 32px; height: 32px; border-radius: 9px; display: flex; align-items: center; justify-content: center; color: var(--mid); transition: all .16s; }
.modal-x:hover { background: var(--subtle-2); color: var(--ink); }
.modal-x svg { width: 15px; height: 15px; }
.modal-body { padding: 18px 24px 24px; overflow: visible; }
.modal-enter-active { transition: opacity .26s var(--ease-out); }
.modal-enter-active .modal { transition: transform .3s var(--ease-spring); }
.modal-enter-from { opacity: 0; }
.modal-enter-from .modal { transform: translateY(22px) scale(.96); }
.modal-leave-active { transition: opacity .16s; }
.modal-leave-to { opacity: 0; }

/* 模态框内的辅助提示条 */
.token-alert {
  background: #faf8f2;
  border: 1px solid #e8e3d5;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 12px;
  color: var(--ink-2);
  line-height: 1.6;
  margin-bottom: 16px;
}

/* 可搜索下拉 */
.combo { position: relative; width: 100%; }
.combo.open { z-index: 90; }
.combo-toggle { width: 100%; height: 46px; border: 1.5px solid rgba(20, 20, 19, 0.14); border-radius: var(--radius-sm); padding: 0 12px; display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13.5px; background: #fff; transition: all .16s; text-align: left; }
.combo-toggle:hover, .combo.open .combo-toggle { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.combo-toggle .ph { color: var(--mid); }
.combo-menu {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0;
  background: #fff; border: 1px solid var(--subtle); border-radius: 14px;
  box-shadow: 0 16px 36px rgba(20,20,19,.14), 0 4px 12px rgba(20,20,19,.08);
  z-index: 100; overflow: hidden; animation: popIn .18s var(--ease-out);
}
.combo-menu .cs { border-bottom: 1px solid var(--subtle-2); }
.combo-menu .cs input { width: 100%; height: 40px; border: none; outline: none; padding: 0 14px; font-size: 13px; background: #fcfbf7; }
.combo-list {
  max-height: 180px; overflow-y: auto; overscroll-behavior: contain;
  scrollbar-width: thin; scrollbar-color: rgba(217,119,87,.25) transparent;
}
.combo-list::-webkit-scrollbar { width: 4px; }
.combo-list::-webkit-scrollbar-thumb { background: rgba(217,119,87,.25); border-radius: 99px; }
.combo-list::-webkit-scrollbar-thumb:hover { background: rgba(217,119,87,.5); }
.combo-opt { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 10px 14px; font-size: 13px; transition: background .13s; text-align: left; }
.combo-opt:hover { background: #f7f5ee; }
.combo-opt.sel { color: var(--accent-ink); font-weight: 700; background: var(--accent-soft); }

/* Toast 提示（层级高于一切遮罩与弹窗） */
.toasts {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--ink);
  color: #f5f3ec;
  border-radius: 13px;
  box-shadow: 0 12px 36px -4px rgba(20, 20, 19, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.08);
  padding: 12px 18px;
  font-size: 13px;
  font-weight: 500;
  min-width: 230px;
  max-width: 420px;
  animation: toastIn .4s var(--ease-spring);
}
.toast .tico { width: 18px; height: 18px; flex: none; }
.toast.success .tico { color: #9db77c; }
.toast.error .tico { color: #e8917a; }
.toast.warn .tico { color: #f59e0b; }
.toast.info .tico { color: var(--accent); }
@keyframes toastIn { from { opacity: 0; transform: translateX(46px); } }

/* 图片回退容器（外部图片加载失败时显示图标底） */
.img-fb { position: relative; display: inline-flex; width: 48px; height: 48px; border-radius: 12px; background: var(--subtle-2); overflow: hidden; flex: none; }
.img-fb.round { border-radius: 50%; }
.img-fb .fb-ic { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--mid); }
.img-fb .fb-ic svg { width: 45%; height: 45%; }
.img-fb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* 大对勾（核销成功） */
.big-check { width: 74px; height: 74px; margin: 0 auto; border-radius: 50%; background: var(--ok-soft); display: flex; align-items: center; justify-content: center; }
.big-check svg { width: 36px; height: 36px; color: var(--ok); }

.warn-banner { border-left: 4px solid var(--accent); background: #fffcf9; }
.school-chip.clickable { cursor: pointer; transition: all .16s; }
.school-chip.clickable:hover { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

.card-action-text { font-size: 11.5px; color: var(--accent); font-weight: 600; margin-top: 10px; }
.token-box { background: var(--subtle-2); padding: 3px 8px; border-radius: 6px; font-size: 11.5px; }
.verify-confirm-alert {
  background: var(--subtle-2); border-radius: 12px; padding: 12px 14px;
  font-size: 12.5px; color: var(--ink-2); line-height: 1.6; margin: 16px 0 20px;
  display: flex; gap: 9px; align-items: flex-start;
}
.school-tag {
  display: inline-flex; align-items: center; gap: 5px; background: var(--subtle-2);
  padding: 3px 9px; border-radius: 6px; font-size: 12px; font-weight: 500;
}

/* 响应式 */
.menu-btn { display: none; }
@media (max-width: 920px) {
  .rail {
    transform: translateX(-100%);
    box-shadow: none;
    z-index: 55;
    transition: transform .28s var(--ease-out);
  }
  .rail.open {
    transform: translateX(0);
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
  }
  .rail-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(18, 18, 17, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 52;
    opacity: 0;
    pointer-events: none;
    transition: opacity .26s var(--ease-out);
  }
  .rail-backdrop.open {
    opacity: 1;
    pointer-events: auto;
  }
  .rail-close-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: #e2dfd2;
    transition: all .16s;
    margin-left: auto;
    flex: none;
  }
  .rail-close-btn:hover, .rail-close-btn:active {
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
  }
  .rail-close-btn svg { width: 15px; height: 15px; }
  .main { margin-left: 0; }
  .topbar { padding: 0 12px; gap: 8px; }
  .topbar h1 { display: none; }
  .topbar .school-chip { margin-left: auto; }
  .school-chip span { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .menu-btn { display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 10px; border: 1.5px solid var(--subtle); background: #fff; color: var(--ink); flex: none; }
  .menu-btn svg { width: 17px; height: 17px; }
  .content { padding: 16px; }
  .card { padding: 18px 16px; border-radius: 18px; }
  .verify-hero { grid-template-columns: 1fr; }
  .search-box input { width: 150px; }
  .verified-box { text-align: left; }
}

/* 尊重系统减弱动效设置 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001s !important; animation-iteration-count: 1 !important; transition-duration: .001s !important; }
}
