/* ===== 瑞思教育 · 认可激励积分管理系统 ===== */

:root {
  /* 主色系（更鲜亮、专业） */
  --primary: #2f6bff;
  --primary-dark: #1d4ed8;
  --primary-light: #dbeafe;
  --primary-bg: #eff6ff;
  --brand: var(--primary);
  --brand-soft: var(--primary-bg);
  --brand-deep: #1e3a8a;

  --success: #16a34a;
  --success-light: #dcfce7;
  --warning: #f59e0b;
  --warning-light: #fef3c7;
  --danger: #e11d48;
  --danger-light: #ffe4e6;

  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;

  --text: #1e293b;
  --text-muted: var(--gray-400);
  --bg: var(--gray-50);
  --border: var(--gray-200);

  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 20px;
  --shadow: 0 1px 3px rgba(15,23,42,0.06), 0 1px 2px rgba(15,23,42,0.04);
  --shadow-md: 0 6px 18px rgba(15,23,42,0.08);
  --shadow-lg: 0 14px 34px rgba(15,23,42,0.13);
  --max-width: 1180px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
}
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  background:
    radial-gradient(1200px 400px at 100% -10%, #e8f0ff 0%, transparent 60%),
    var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  touch-action: pan-y;
}
img { max-width: 100%; height: auto; }

/* ===== Header（员工端 / 大气渐变 + Logo）===== */
.header {
  background: linear-gradient(120deg, #1e3a8a 0%, #2563eb 52%, #3b82f6 100%);
  color: #fff;
  padding: 18px 0;
  box-shadow: 0 6px 24px rgba(37,99,235,0.28);
  position: relative;
}
.header::after {
  content: '';
  position: absolute;
  top: -60%; right: -8%;
  width: 320px; height: 320px;
  background: radial-gradient(circle, rgba(255,255,255,0.16), transparent 70%);
  border-radius: 50%;
}
.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.header-left { display: flex; align-items: center; }
.brand-logo {
  width: 46px; height: 46px;
  border-radius: 13px;
  background: rgba(255,255,255,0.18);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; margin-right: 14px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.25);
  backdrop-filter: blur(4px);
}
.header-title {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.3px;
  line-height: 1.32;
}
.header-sub {
  font-size: 12.5px;
  opacity: 0.88;
  margin-top: 3px;
}
#header-balance {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 20px; font-weight: 800;
  color: #fef08a; text-shadow: 0 2px 6px rgba(0,0,0,0.22);
  margin-top: 5px; letter-spacing: 0.5px;
}
#header-balance::before {
  content: '💎'; font-size: 0.9em; filter: drop-shadow(0 1px 2px rgba(0,0,0,0.2));
}
.header-nav { display: flex; gap: 8px; }
.header-nav a {
  color: #fff;
  text-decoration: none;
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  opacity: 0.85;
  transition: all 0.2s;
  border: 1px solid transparent;
}
.header-nav a:hover { opacity: 1; background: rgba(255,255,255,0.16); }
.header-nav a.active { background: rgba(255,255,255,0.22); opacity: 1; border-color: rgba(255,255,255,0.3); }
.header-nav a[onclick] { cursor: pointer; }

/* 右上角用户菜单（我的兑换 / 修改密码 / 退出） */
.header-right { display: flex; align-items: center; gap: 10px; position: relative; }
.user-menu {
  display: flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.16); border: 1px solid rgba(255,255,255,0.28);
  padding: 7px 14px; border-radius: 999px; cursor: pointer;
  color: #fff; font-size: 14px; font-weight: 500; transition: all 0.2s; user-select: none;
}
.user-menu:hover { background: rgba(255,255,255,0.26); }
.user-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: #fff; color: var(--primary-dark);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700;
}
.user-arrow { font-size: 10px; opacity: 0.85; }
.user-dropdown {
  position: absolute; top: calc(100% + 10px); right: 0; min-width: 188px;
  background: #fff; border-radius: var(--radius-sm); box-shadow: var(--shadow-lg);
  padding: 8px; display: none; flex-direction: column; z-index: 1200;
  border: 1px solid var(--gray-200);
}
.user-dropdown.show { display: flex; }

/* ===== 消息通知铃铛 + 红点 + 面板 ===== */
.notif-bell {
  position: relative; display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%; cursor: pointer;
  background: rgba(255,255,255,0.16); border: 1px solid rgba(255,255,255,0.28);
  color: #fff; transition: all 0.2s;
}
.notif-bell:hover { background: rgba(255,255,255,0.26); }
.notif-icon { font-size: 19px; line-height: 1; }
.notif-dot {
  position: absolute; top: 8px; right: 9px;
  width: 9px; height: 9px; border-radius: 50%; background: #ff4d4f;
  box-shadow: 0 0 0 2px rgba(255,255,255,0.85);
}
.notif-count {
  position: absolute; top: 3px; right: 2px; min-width: 17px; height: 17px; padding: 0 4px;
  border-radius: 999px; background: #ff4d4f; color: #fff;
  font-size: 11px; font-weight: 700; line-height: 17px; text-align: center;
  box-shadow: 0 0 0 2px rgba(255,255,255,0.85);
}
.notif-panel {
  position: absolute; top: calc(100% + 10px); right: 0; width: 360px; max-width: 90vw;
  background: #fff; border-radius: var(--radius-sm); box-shadow: var(--shadow-lg);
  border: 1px solid var(--gray-200); z-index: 1300;
  display: none; flex-direction: column; overflow: hidden;
}
.notif-panel.show { display: flex; }
.notif-panel-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 16px; border-bottom: 1px solid var(--gray-200);
  font-size: 15px; font-weight: 700; color: var(--gray-800);
}
.notif-read-all { font-size: 13px; font-weight: 500; color: var(--primary); cursor: pointer; }
.notif-read-all:hover { text-decoration: underline; }
.notif-list { max-height: 420px; overflow-y: auto; padding: 6px; }
.notif-empty {
  text-align: center; color: var(--gray-400); font-size: 13px; padding: 40px 12px;
}
.notif-item {
  display: flex; gap: 11px; align-items: flex-start;
  padding: 12px 12px; border-radius: 10px; cursor: pointer; transition: background 0.15s;
  position: relative;
}
.notif-item:hover { background: var(--gray-50); }
.notif-item.unread { background: var(--primary-bg); }
.notif-item.unread:hover { background: #eef2ff; }
.notif-item-icon { font-size: 18px; line-height: 1.4; flex-shrink: 0; }
.notif-item-body { flex: 1; min-width: 0; }
.notif-item-title { font-size: 14px; font-weight: 700; color: var(--gray-800); }
.notif-item.unread .notif-item-title::after {
  content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: #ff4d4f; margin-left: 7px; vertical-align: middle;
}
.notif-item-msg {
  font-size: 13px; color: var(--gray-600); margin-top: 3px; line-height: 1.5;
  word-break: break-word;
}
.notif-item-time { font-size: 11px; color: var(--gray-400); margin-top: 5px; }
.notif-item-del {
  flex-shrink: 0; width: 20px; height: 20px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--gray-400); font-size: 16px; line-height: 1; cursor: pointer;
}
.notif-item-del:hover { background: var(--gray-200); color: var(--gray-700); }

.user-dropdown a {
  padding: 11px 14px; border-radius: 8px; color: var(--gray-700);
  font-size: 14px; cursor: pointer; text-decoration: none; transition: background 0.15s;
  display: flex; align-items: center; gap: 8px;
}
.user-dropdown a:hover { background: var(--gray-100); color: var(--primary-dark); }

/* ===== Container ===== */
.container { max-width: var(--max-width); margin: 0 auto; padding: 28px 24px 48px; }

/* ===== Card ===== */
.card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px;
  margin-bottom: 22px;
  border: 1px solid rgba(226,232,240,0.7);
  transition: box-shadow 0.2s, transform 0.2s;
}
.card:hover { box-shadow: var(--shadow-md); }
.card-title {
  font-size: 16.5px;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 9px;
}
.card-title::before {
  content: '';
  width: 5px; height: 18px;
  background: linear-gradient(var(--primary), var(--primary-dark));
  border-radius: 3px;
}

/* ===== Search Box ===== */
.search-box { display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap; }
.search-field { flex: 1; min-width: 170px; }
.search-field label {
  display: block; font-size: 13px; font-weight: 600; color: var(--gray-600); margin-bottom: 7px;
}
.search-field input, .search-field select {
  width: 100%; padding: 11px 15px; border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm); font-size: 15px; color: var(--gray-800); background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.search-field input:focus, .search-field select:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-light);
}

/* ===== Button ===== */
.btn {
  padding: 11px 26px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}
.btn-primary {
  background: linear-gradient(120deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  box-shadow: 0 4px 12px rgba(47,107,255,0.32);
}
.btn-primary:hover { background: linear-gradient(120deg, #3b78ff, #1d4ed8); transform: translateY(-1px); box-shadow: 0 6px 16px rgba(47,107,255,0.4); }
.btn-success { background: linear-gradient(120deg, #22c55e, #16a34a); color: #fff; box-shadow: 0 4px 12px rgba(22,163,74,0.3); }
.btn-success:hover { background: #15803d; transform: translateY(-1px); }
.btn-danger { background: linear-gradient(120deg, #f43f5e, #e11d48); color: #fff; }
.btn-danger:hover { background: #be123c; transform: translateY(-1px); }
.btn-warning { background: linear-gradient(120deg, #fbbf24, #f59e0b); color: #fff; }
.btn-warning:hover { background: #d97706; transform: translateY(-1px); }
.btn-outline { background: #fff; color: var(--gray-700); border: 1px solid var(--gray-300); }
.btn-outline:hover { background: var(--gray-50); border-color: var(--gray-400); }
.btn-sm { padding: 7px 15px; font-size: 13px; border-radius: 8px; box-shadow: none; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }

/* ===== Stats Cards ===== */
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 22px; }
.stat-card {
  background: #fff; border-radius: var(--radius); padding: 26px 24px;
  box-shadow: var(--shadow); text-align: left; position: relative; overflow: hidden;
  border: 1px solid rgba(226,232,240,0.7);
}
.stat-card::before {
  content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 5px;
}
.stat-card.blue::before { background: linear-gradient(90deg, var(--primary), #60a5fa); }
.stat-card.green::before { background: linear-gradient(90deg, var(--success), #4ade80); }
.stat-card.orange::before { background: linear-gradient(90deg, var(--warning), #fbbf24); }
.stat-card.purple::before { background: linear-gradient(90deg, #8b5cf6, #a78bfa); }
.stat-card.red::before { background: linear-gradient(90deg, #ef4444, #f87171); }
.stat-card.amber::before { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.stat-card.cyan::before { background: linear-gradient(90deg, #06b6d4, #22d3ee); }
.stat-card.indigo::before { background: linear-gradient(90deg, #4f46e5, #818cf8); }
.stat-label { font-size: 14px; color: var(--gray-500); font-weight: 600; }
.stat-value { font-size: 38px; font-weight: 800; margin: 10px 0 2px; line-height: 1.1; }
.stat-card.blue .stat-value { color: var(--primary); }
.stat-card.green .stat-value { color: var(--success); }
.stat-card.orange .stat-value { color: #d97706; }
.stat-card.purple .stat-value { color: #7c3aed; }
.stat-card.red .stat-value { color: #dc2626; }
.stat-card.amber .stat-value { color: #b45309; }
.stat-card.cyan .stat-value { color: #0891b2; }
.stat-card.indigo .stat-value { color: #4338ca; }
.stat-sub { font-size: 12.5px; color: var(--gray-400); }

/* ===== Employee Info Bar ===== */
.emp-bar {
  display: flex; align-items: center; gap: 16px; padding: 18px 22px;
  background: linear-gradient(120deg, var(--primary-bg), #f5f9ff);
  border: 1px solid var(--primary-light);
  border-radius: var(--radius); margin-bottom: 22px;
}
.emp-avatar {
  width: 52px; height: 52px; border-radius: 50%;
  background: linear-gradient(120deg, var(--primary), var(--primary-dark));
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 700; flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(47,107,255,0.35);
}
.emp-info { flex: 1; }
.emp-name { font-size: 19px; font-weight: 700; color: var(--gray-800); }
.emp-meta { font-size: 13px; color: var(--gray-500); margin-top: 3px; }

/* ===== Monthly Chart ===== */
.chart-container { display: flex; align-items: flex-end; gap: 12px; height: 210px; padding: 16px 0 0; overflow-x: auto; }
.chart-bar-group { display: flex; flex-direction: column; align-items: center; flex: 1; min-width: 52px; }
.chart-bars { display: flex; gap: 4px; align-items: flex-end; height: 168px; }
.chart-bar { width: 17px; border-radius: 5px 5px 0 0; transition: height 0.5s ease; min-height: 2px; position: relative; }
.chart-bar.branch { background: linear-gradient(var(--primary), #60a5fa); }
.chart-bar.campus { background: linear-gradient(var(--success), #4ade80); }
.chart-bar.empty { background: var(--gray-200); }
.chart-bar:hover::after {
  content: attr(data-value); position: absolute; top: -22px; left: 50%; transform: translateX(-50%);
  font-size: 12px; font-weight: 600; color: var(--gray-700); white-space: nowrap;
  background: #fff; padding: 2px 6px; border-radius: 6px; box-shadow: var(--shadow);
}
.chart-label { font-size: 12.5px; color: var(--gray-500); margin-top: 9px; font-weight: 500; }
.chart-legend { display: flex; gap: 22px; justify-content: center; margin-top: 14px; font-size: 13px; color: var(--gray-600); }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.chart-legend span::before { content: ''; width: 12px; height: 12px; border-radius: 3px; }
.chart-legend .branch::before { background: var(--primary); }
.chart-legend .campus::before { background: var(--success); }

/* ===== Detail Table ===== */
.month-section { margin-bottom: 16px; border: 1px solid var(--gray-200); border-radius: var(--radius-sm); overflow: hidden; }
.month-header {
  padding: 13px 18px; background: var(--gray-50); cursor: pointer;
  display: flex; align-items: center; justify-content: space-between;
  font-weight: 600; font-size: 15px; color: var(--gray-700); transition: background 0.2s;
}
.month-header:hover { background: var(--gray-100); }
.month-header .arrow { transition: transform 0.2s; font-size: 12px; color: var(--gray-400); }
.month-header.open .arrow { transform: rotate(90deg); }
.month-summary { font-size: 13px; color: var(--gray-500); font-weight: 400; }
.month-body { display: none; padding: 0; }
.month-body.open { display: block; }
.detail-subtitle { font-size: 13px; font-weight: 600; color: var(--primary); padding: 14px 16px 8px; }

table { width: 100%; border-collapse: collapse; }
table.detail-table { table-layout: fixed; }
table.detail-table th:nth-child(1) { width: 86px; }
table.detail-table th:nth-child(2) { width: 18%; }
table.detail-table th:nth-child(3) { width: 26%; }
table.detail-table th:nth-child(4) { width: auto; }
table.detail-table th:nth-child(5) { width: 72px; }
table.detail-table td { overflow-wrap: break-word; word-break: break-word; vertical-align: top; }
table th {
  text-align: left; padding: 12px 16px; font-size: 13px; font-weight: 700;
  color: var(--gray-500); background: var(--gray-50); border-bottom: 2px solid var(--gray-200);
  white-space: nowrap;
}
table td { padding: 13px 16px; font-size: 14px; color: var(--gray-700); border-bottom: 1px solid var(--gray-100); }
table tbody tr { transition: background 0.15s; }
table tbody tr:nth-child(even) { background: #fcfdff; }
table tbody tr:hover { background: var(--primary-bg); }
table tr:last-child td { border-bottom: none; }

.tag {
  display: inline-block; padding: 3px 11px; border-radius: 999px;
  font-size: 12px; font-weight: 600;
  white-space: nowrap; vertical-align: middle;
}
.tag-branch { background: var(--primary-light); color: var(--primary-dark); }
.tag-campus { background: var(--success-light); color: #15803d; }
.tag-pending { background: var(--warning-light); color: #92400e; }
.tag-approved { background: var(--primary-light); color: var(--primary-dark); }
.tag-verified { background: var(--success-light); color: #15803d; }
.tag-rejected { background: var(--danger-light); color: var(--danger); }

.points-text { font-weight: 700; color: var(--primary); }

/* ===== 商城横幅 ===== */
.mall-banner {
  display: flex; align-items: center; gap: 14px; margin-bottom: 16px;
  padding: 16px 20px; border-radius: var(--radius);
  background: linear-gradient(120deg, #1e3a8a 0%, #2563eb 55%, #3b82f6 100%);
  color: #fff; box-shadow: 0 8px 22px rgba(37,99,235,0.28);
}
.mall-banner .banner-icon {
  width: 46px; height: 46px; border-radius: 12px; background: rgba(255,255,255,0.18);
  display: flex; align-items: center; justify-content: center; font-size: 26px; flex-shrink: 0;
}
.mall-banner .banner-title { font-size: 17px; font-weight: 700; letter-spacing: 0.3px; }
.mall-banner .banner-sub { font-size: 12.5px; opacity: 0.9; margin-top: 2px; }

/* ===== 分类筛选条 ===== */
.gift-filter { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.chip {
  padding: 7px 16px; border-radius: 999px; font-size: 13.5px; font-weight: 500;
  border: 1px solid var(--gray-200); background: #fff; color: var(--gray-600);
  cursor: pointer; transition: all 0.18s; white-space: nowrap;
}
.chip:hover { border-color: var(--primary); color: var(--primary); }
.chip.active { background: linear-gradient(120deg, var(--primary) 0%, var(--primary-dark) 100%); color: #fff; border-color: transparent; box-shadow: 0 4px 12px rgba(47,107,255,0.3); }
.chip.affordable { border-color: var(--success); color: var(--success); }
.chip.affordable.active { background: linear-gradient(120deg, #16a34a 0%, #15803d 100%); color: #fff; border-color: transparent; box-shadow: 0 4px 12px rgba(22,163,74,0.25); }

/* ===== Gift Grid（电商风） ===== */
.gift-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 18px; }
.gift-card {
  background: #fff; border: 1px solid var(--gray-200); border-radius: 14px;
  overflow: hidden; transition: all 0.25s; display: flex; flex-direction: column;
  box-shadow: var(--shadow); position: relative;
}
.gift-card:hover { box-shadow: var(--shadow-lg); border-color: var(--primary-light); transform: translateY(-4px); }
.gift-card.disabled { opacity: 0.6; }
.gift-image {
  position: relative; width: 100%; aspect-ratio: 1 / 1; overflow: hidden;
  display: flex; align-items: center; justify-content: center; font-size: 72px;
  background: linear-gradient(135deg, #f1f5f9 0%, var(--primary-bg) 100%);
}
.gift-image .gift-img-el {
  width: 100%; height: 100%; object-fit: cover;
}
.gift-cat-tag {
  display: inline-flex; align-items: center;
  padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 600;
  color: var(--primary); background: var(--primary-bg);
  border: 1px solid var(--primary-light);
  margin: 2px 0 8px; width: fit-content;
}
.gift-list-item .gift-cat-tag { margin: 2px 0 6px; }
.gift-body { padding: 14px 14px 16px; flex: 1; display: flex; flex-direction: column; }
.gift-name { font-size: 15.5px; font-weight: 700; color: var(--gray-800); line-height: 1.4; }
.gift-desc {
  font-size: 12.5px; color: var(--gray-500); margin: 6px 0 12px; flex: 1;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.gift-bottom { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; }
.gift-points { font-size: 22px; font-weight: 800; color: #e1251b; line-height: 1; }
.gift-points span { font-size: 13px; font-weight: 500; color: #e1251b; opacity: 0.85; }
.gift-stock { font-size: 12px; color: var(--gray-500); margin-top: 8px; }
.gift-stock .out { color: var(--danger); font-weight: 600; }

/* ===== 兑换记录状态说明 ===== */
.redeem-status-help {
  margin-bottom: 18px; padding: 14px 16px;
  background: var(--primary-bg); border: 1px solid var(--primary-light); border-radius: var(--radius-sm);
}
.redeem-status-help .help-title {
  font-size: 13px; font-weight: 700; color: var(--brand-deep); margin-bottom: 10px;
}
.redeem-status-help .help-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px 16px;
}
.redeem-status-help .help-grid > div {
  display: flex; align-items: flex-start; gap: 8px; font-size: 12.5px; color: var(--gray-700);
  line-height: 1.5;
}
.redeem-status-help .tag {
  flex: 0 0 auto;
  font-size: 11px; padding: 2px 6px; line-height: 1.45;
  white-space: nowrap;
}
.redeem-status-help .help-text {
  flex: 1 1 auto;
  color: var(--gray-600);
  word-break: break-word;
}

/* ===== Modal ===== */
.modal-overlay,
.modal-mask {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(15,23,42,0.5); display: none; align-items: flex-start; justify-content: center; z-index: 1300;
  backdrop-filter: blur(2px);
  padding: 24px 0;
  overflow-y: auto;
}
.modal-overlay.show,
.modal-mask.show { display: flex; }
.modal { background: #fff; border-radius: var(--radius); padding: 32px; max-width: 440px; width: 92%; max-height: calc(100vh - 48px); overflow-y: auto; box-shadow: var(--shadow-lg); }
.modal h3 { font-size: 20px; margin-bottom: 16px; color: var(--gray-800); }
.modal-info { background: var(--gray-50); border-radius: var(--radius-sm); padding: 16px; margin: 16px 0; font-size: 14px; }
.modal-info-row { display: flex; justify-content: space-between; padding: 5px 0; }
.modal-actions { display: flex; gap: 12px; margin-top: 20px; }
.modal-actions .btn { flex: 1; justify-content: center; }
.modal-tips {
  margin-top: 14px; padding: 12px 14px; background: #fff7ed;
  border: 1px solid #ffedd5; border-radius: var(--radius-sm);
  font-size: 12.5px; color: #7c2d12; line-height: 1.8;
}
.modal-tips .tag { font-size: 11px; padding: 1px 6px; margin: 0 2px; vertical-align: middle; }
.virtual-note { background: #eff6ff; border-color: #bfdbfe; color: #1e40af; margin-top: 12px; }
.virtual-note strong { color: #1d4ed8; }
.req { color: var(--danger); margin-left: 2px; }
#redeem-phone {
  width: 100%; height: 40px; padding: 0 12px; font-size: 15px;
  border: 1px solid var(--gray-300); border-radius: var(--radius-sm); background: #fff;
  box-sizing: border-box; letter-spacing: 1px;
}
#redeem-phone:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-bg); }

/* ===== 我的兑换记录抽屉 ===== */
.drawer-overlay {
  position: fixed; inset: 0; background: rgba(15,23,42,0.45);
  display: none; z-index: 1100; opacity: 0; transition: opacity 0.3s ease;
}
.drawer-overlay.show { display: block; opacity: 1; }
/* 我的兑换记录：居中宽大弹窗，避免抽屉过窄导致文字/按钮折行 */
.drawer {
  position: fixed; top: 50%; left: 50%;
  width: 92vw; max-width: 1100px; height: 90vh; max-height: 820px;
  background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  transform: translate(-50%, -50%) scale(0.96);
  opacity: 0; transition: all 0.25s cubic-bezier(0.4,0,0.2,1);
  z-index: 1101; display: flex; flex-direction: column;
  visibility: hidden; pointer-events: none;
}
.drawer.show { transform: translate(-50%, -50%) scale(1); opacity: 1; visibility: visible; pointer-events: auto; }
.drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 26px; border-bottom: 1px solid var(--gray-200);
  background: linear-gradient(120deg, #1e3a8a 0%, #2563eb 60%, #3b82f6 100%);
  color: #fff; flex-shrink: 0;
}
.drawer-title { font-size: 19px; font-weight: 700; }
.drawer-close {
  width: 36px; height: 36px; border: none; border-radius: 50%;
  background: rgba(255,255,255,0.18); color: #fff; font-size: 24px; line-height: 1;
  cursor: pointer; transition: background 0.15s;
}
.drawer-close:hover { background: rgba(255,255,255,0.3); }
.drawer-body { flex: 1; overflow-y: auto; padding: 22px 26px 30px; min-height: 0; }
.drawer-body table { width: 100%; }
.drawer-body table th,
.drawer-body table td { white-space: nowrap; }
.drawer-body table td:nth-child(2) { white-space: normal; } /* 礼品名称允许折行 */

/* ===== Toast ===== */
.toast {
  position: fixed; top: 22px; left: 50%; transform: translateX(-50%) translateY(-120px);
  padding: 13px 30px; border-radius: 999px; font-size: 15px; font-weight: 500;
  z-index: 2000; transition: transform 0.3s ease; box-shadow: var(--shadow-lg);
}
.toast.show { transform: translateX(-50%) translateY(0); }
.toast.success { background: var(--success); color: #fff; }
.toast.error { background: var(--danger); color: #fff; }
.toast.info { background: var(--primary); color: #fff; }

/* ===== Empty State ===== */
.empty-state { text-align: center; padding: 52px 24px; color: var(--gray-400); }
.empty-state .icon { font-size: 50px; margin-bottom: 12px; }

/* ===== 录入记录汇总条 ===== */
.summary-bar { display: flex; flex-wrap: wrap; gap: 20px; padding: 12px 16px; margin-bottom: 14px;
  background: var(--gray-50); border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 14px; color: var(--gray-600); }
.summary-bar strong { color: var(--gray-800); font-weight: 700; margin-left: 4px; }
.empty-state .text { font-size: 15px; }

/* ===== Filter Bar ===== */
.filter-bar { display: flex; gap: 12px; align-items: center; margin-bottom: 20px; flex-wrap: wrap; }
.filter-bar select, .filter-bar input {
  padding: 9px 15px; border: 1px solid var(--gray-300); border-radius: var(--radius-sm);
  font-size: 14px; background: #fff; color: var(--gray-700); transition: all 0.2s;
}
.filter-bar select:focus, .filter-bar input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-light); }

/* ===== Chip Group ===== */
.chip-group { display: flex; gap: 10px; flex-wrap: wrap; }
.chip {
  padding: 7px 14px; border-radius: 999px; border: 1px solid var(--gray-300);
  background: #fff; color: var(--gray-600); font-size: 13px; cursor: pointer;
  transition: all 0.2s; font-weight: 500;
}
.chip:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
.chip.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ===== Tabs ===== */
.tabs { display: flex; gap: 4px; margin-bottom: 22px; border-bottom: 2px solid var(--gray-200); }
.tab {
  padding: 11px 22px; font-size: 15px; font-weight: 600; color: var(--gray-500);
  cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px; transition: all 0.2s;}
.tab:hover { color: var(--gray-700); }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .stats-grid { grid-template-columns: 1fr; }
  .header-inner { flex-direction: column; gap: 12px; }
  .header-nav { flex-wrap: wrap; justify-content: center; }
  .gift-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .search-box { flex-direction: column; }
  .search-field { min-width: 100%; }
  .admin-layout { flex-direction: column; }
  .admin-sidebar { width: 100%; min-width: 100%; }
}

/* ===== Admin Layout ===== */
.admin-layout { display: flex; gap: 22px; max-width: 1320px; margin: 0 auto; padding: 24px; align-items: flex-start; }
.admin-sidebar {
  width: 232px; min-width: 232px; background: #fff; border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 14px; position: sticky; top: 20px;
  border: 1px solid rgba(226,232,240,0.7);
}
.sidebar-brand {
  display: flex; align-items: center; gap: 11px; padding: 10px 12px 16px;
  margin-bottom: 10px; border-bottom: 1px solid var(--gray-200);
}
.sidebar-brand .s-logo {
  width: 40px; height: 40px; border-radius: 11px; flex-shrink: 0;
  background: linear-gradient(120deg, var(--primary), var(--primary-dark));
  display: flex; align-items: center; justify-content: center; font-size: 21px; color: #fff;
  box-shadow: 0 4px 10px rgba(47,107,255,0.35);
}
.sidebar-brand .s-name { font-size: 13px; font-weight: 700; color: var(--gray-800); line-height: 1.35; }
.sidebar-brand .s-sub { font-size: 11px; color: var(--gray-400); margin-top: 2px; }
.admin-sidebar .nav-item {
  display: flex; align-items: center; gap: 10px; padding: 12px 16px;
  border-radius: var(--radius-sm); color: var(--gray-600); text-decoration: none;
  font-size: 14px; font-weight: 500; margin-bottom: 4px; transition: all 0.2s;
}
.admin-sidebar .nav-item:hover { background: var(--gray-50); color: var(--gray-800); }
.admin-sidebar .nav-item.active { background: var(--primary-light); color: var(--primary-dark); font-weight: 700; }
.admin-sidebar .nav-item .icon { font-size: 18px; }
.admin-content { flex: 1; min-width: 0; }
.admin-sidebar .nav-divider { height: 1px; background: var(--gray-200); margin: 10px 4px; }

/* ===== Login Modal ===== */
.login-overlay {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(15,23,42,0.6); display: flex; align-items: center; justify-content: center; z-index: 2000;
  backdrop-filter: blur(3px);
}
.login-box {
  background: #fff; border-radius: var(--radius); padding: 42px;
  width: 90%; max-width: 372px; box-shadow: var(--shadow-lg); text-align: center;
}
.login-box h2 { font-size: 21px; margin-bottom: 8px; color: var(--gray-800); }
.login-box p { font-size: 13px; color: var(--gray-400); margin-bottom: 24px; }
.login-box input {
  width: 100%; padding: 12px 16px; border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm); font-size: 16px; text-align: center; margin-bottom: 16px; transition: all 0.2s;
}
.login-box input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-light); }

/* ===== Form Grid ===== */
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; color: var(--gray-600); margin-bottom: 7px; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 11px 15px; border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm); font-size: 15px; color: var(--gray-800); background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-light);
}
.form-group textarea { resize: vertical; min-height: 60px; }
.form-actions { margin-top: 22px; display: flex; gap: 12px; }

/* ===== 校区录入：双栏布局 ===== */
.entry-cols { display: flex; gap: 16px; align-items: flex-start; }
.entry-col-left { flex: 0 0 320px; }
.entry-col-right { flex: 1; min-width: 0; }
.entry-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; gap: 12px; flex-wrap: wrap; }
.entry-title { font-size: 20px; font-weight: 700; color: var(--gray-800); }
.entry-title .emoji { margin-right: 6px; }
.subtitle { font-size: 13px; color: var(--gray-400); margin-top: 4px; }
.emp-search-box { margin-bottom: 10px; }
.form-control { width: 100%; padding: 10px 14px; border: 1px solid var(--gray-300); border-radius: var(--radius-sm); font-size: 14px; color: var(--gray-800); background: #fff; box-sizing: border-box; transition: all 0.2s; }
.form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-light); }
.roster { max-height: 440px; overflow-y: auto; border: 1px solid var(--gray-200); border-radius: var(--radius-sm); background: #fff; }
.roster-row { padding: 11px 13px; cursor: pointer; border-bottom: 1px solid var(--gray-100); display: flex; justify-content: space-between; align-items: center; gap: 8px; transition: background 0.15s; }
.roster-row:last-child { border-bottom: none; }
.roster-row:hover { background: var(--gray-50); }
.roster-row.active { background: var(--primary-bg); box-shadow: inset 3px 0 0 var(--primary); }
.roster-name { font-weight: 600; color: var(--gray-800); }
.roster-meta { font-size: 12px; color: var(--gray-400); margin-top: 2px; }
.roster-empty { padding: 28px; text-align: center; color: var(--gray-400); font-size: 13px; }
.selected-emp-card { background: var(--primary-bg); border: 1px solid var(--primary-light); border-radius: var(--radius-sm); padding: 13px 15px; margin-bottom: 16px; }
.selected-emp-card .se-name { font-weight: 700; font-size: 16px; color: var(--gray-800); }
.selected-emp-card .se-meta { font-size: 13px; color: var(--gray-500); margin-top: 2px; }
.bonus-list { margin-bottom: 12px; }
.bonus-row { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; flex-wrap: wrap; }
.bonus-row select, .bonus-row input { flex: 1; min-width: 0; padding: 9px 12px; border: 1px solid var(--gray-300); border-radius: var(--radius-sm); font-size: 14px; background: #fff; transition: all 0.2s; }
.bonus-row select:focus, .bonus-row input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }
.bonus-row .b-points { flex: 0 0 100px; }
.bonus-row .b-name { flex: 1; }
.bonus-row .b-del { flex: 0 0 auto; }
.bonus-row.is-custom .b-name { display: block; }
@media (max-width: 768px) {
  .entry-cols { flex-direction: column; }
  .entry-col-left { flex: 1 1 auto; width: 100%; }
}

/* ===== Campus 登录 ===== */
.campus-login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.campus-login .login-box h2 { font-size: 22px; }
.campus-login .login-box { max-width: 380px; }
.campus-login .brand-row { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 6px; }
.campus-login .brand-row .b-logo { width: 42px; height: 42px; border-radius: 12px; background: linear-gradient(120deg, var(--primary), var(--primary-dark)); display: flex; align-items: center; justify-content: center; font-size: 22px; color: #fff; box-shadow: 0 4px 10px rgba(47,107,255,0.35); }

/* ===== Table ===== */
.table-wrap { overflow-x: auto; }
.table-scroll { max-height: 600px; overflow-y: auto; }
.table-wrap table { min-width: 600px; }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.cell-strong { font-weight: 600; color: var(--gray-800); }
.cell-muted { color: var(--gray-400); font-size: 13px; }
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 16px; }
.page-btn { padding: 6px 12px; border: 1px solid var(--gray-300); border-radius: var(--radius-sm); background: #fff; cursor: pointer; font-size: 13px; transition: all 0.2s; }
.page-btn:hover { border-color: var(--primary); color: var(--primary); }
.page-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ===== Section header ===== */
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; flex-wrap: wrap; gap: 12px; }
.section-header .title { font-size: 18px; font-weight: 700; color: var(--gray-800); }
.section-header .subtitle { font-size: 13px; color: var(--gray-400); margin-top: 2px; }

/* ===== Upload zone ===== */
.upload-zone {
  border: 2px dashed var(--gray-300); border-radius: var(--radius); padding: 26px; text-align: center;
  color: var(--gray-400); cursor: pointer; transition: all 0.2s; margin-top: 12px; background: var(--gray-50);
}
.upload-zone:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-bg); }
.upload-zone.dragover { border-color: var(--primary); background: var(--primary-bg); }
.upload-zone .icon { font-size: 34px; margin-bottom: 8px; }

/* ===== Upload result (批量导入反馈) ===== */
.upload-result { margin-top: 12px; font-size: 13px; }
.upload-result .ok { color: var(--success); font-weight: 600; margin-bottom: 6px; }
.upload-result .warn { color: #b7791f; background: #fffaf0; border: 1px solid #f6e0b5; border-radius: 6px; padding: 6px 10px; margin-top: 6px; }
.upload-result .err { color: var(--danger); background: #fff5f5; border: 1px solid #fecaca; border-radius: 6px; padding: 6px 10px; }
.upload-result .info { color: var(--gray-500); background: var(--gray-50); border: 1px solid var(--border); border-radius: 6px; padding: 6px 10px; }

/* ===== Badge count ===== */
.badge-count {
  display: inline-block; min-width: 20px; padding: 1px 7px; border-radius: 10px;
  background: var(--primary); color: #fff; font-size: 11px; font-weight: 700; text-align: center; margin-left: 4px;
}

/* ===== Page hero（后台内容区顶部横幅）===== */
.page-hero {
  background: #fff; border-radius: var(--radius); padding: 22px 26px; margin-bottom: 22px;
  border: 1px solid rgba(226,232,240,0.7); box-shadow: var(--shadow);
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.page-hero .ph-title { font-size: 20px; font-weight: 700; color: var(--gray-800); }
.page-hero .ph-sub { font-size: 13px; color: var(--gray-400); margin-top: 4px; }

/* ===== Two column on desktop ===== */
@media (min-width: 900px) {
  .form-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
  .form-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
}

/* ===== 礼品图片（上传图 / emoji 兼容）===== */
.gift-image { position: relative; overflow: hidden; }
.gift-image img.gift-img-el {
  width: 100%; height: 100%; object-fit: cover;
  font-size: 13px; color: var(--gray-400); text-align: center;
  display: flex; align-items: center; justify-content: center;
}
.gift-image .att-badge {
  position: absolute; top: 8px; right: 8px;
  background: rgba(15,23,42,0.62); color: #fff; font-size: 12px; font-weight: 600;
  padding: 2px 8px; border-radius: 999px; backdrop-filter: blur(2px);
}

/* ===== 兑换数量步进器 ===== */
.qty-row { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; }
.qty-label { font-size: 14px; font-weight: 600; color: var(--gray-600); }
.qty-stepper {
  display: inline-flex; align-items: center; gap: 0;
  border: 1px solid var(--gray-300); border-radius: var(--radius-sm); overflow: hidden; background: #fff;
}
.qty-stepper .qs-btn {
  width: 38px; height: 38px; border: none; background: var(--gray-50); color: var(--gray-700);
  font-size: 20px; font-weight: 700; cursor: pointer; transition: background 0.15s; line-height: 1;
}
.qty-stepper .qs-btn:hover { background: var(--primary-bg); color: var(--primary); }
.qty-stepper input {
  width: 56px; height: 38px; border: none; border-left: 1px solid var(--gray-200); border-right: 1px solid var(--gray-200);
  text-align: center; font-size: 16px; font-weight: 700; color: var(--gray-800); background: #fff; -moz-appearance: textfield;
}
.qty-stepper input::-webkit-outer-spin-button,
.qty-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty-stepper input:focus { outline: none; box-shadow: inset 0 0 0 2px var(--primary-light); }

/* ===== 图片预览 ===== */
.img-preview { margin-top: 12px; }
.img-thumb {
  position: relative; display: inline-block; width: 120px; height: 120px;
  border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--gray-200); box-shadow: var(--shadow);
}
.img-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.img-del {
  position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border-radius: 50%;
  border: none; background: rgba(15,23,42,0.6); color: #fff; font-size: 16px; line-height: 1;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.img-del:hover { background: var(--danger); }

/* ===== 附件列表 ===== */
.att-list { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.att-chip {
  position: relative; display: flex; align-items: center; gap: 6px;
  background: var(--gray-50); border: 1px solid var(--gray-200); border-radius: var(--radius-sm);
  padding: 6px 10px; max-width: 220px;
}
.att-chip img { width: 36px; height: 36px; border-radius: 8px; object-fit: cover; flex-shrink: 0; }
.att-chip .att-file { font-size: 22px; }
.att-chip .att-name {
  font-size: 13px; color: var(--gray-700); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 140px;
}
.att-chip .att-del {
  position: absolute; top: -7px; right: -7px; width: 20px; height: 20px; border-radius: 50%;
  border: none; background: var(--danger); color: #fff; font-size: 13px; line-height: 1;
  cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow);
}
.att-chip .att-del:hover { background: #be123c; }

/* ===== 确认弹窗（导入/录入前预览） ===== */
.modal-overlay.show { display: flex; }
.confirm-modal { max-width: 860px; width: 94%; padding: 0; overflow: hidden; }
.confirm-modal .modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 22px; border-bottom: 1px solid var(--border);
  background: linear-gradient(120deg, var(--primary-bg), #f5f9ff);
}
.confirm-modal .modal-title { font-size: 17px; font-weight: 700; color: var(--gray-800); }
.confirm-modal .modal-close {
  width: 30px; height: 30px; border: none; background: transparent; font-size: 22px;
  color: var(--gray-400); cursor: pointer; border-radius: 8px; line-height: 1;
}
.confirm-modal .modal-close:hover { background: var(--gray-100); color: var(--gray-600); }
.confirm-modal .modal-body { padding: 18px 22px; max-height: 62vh; overflow-y: auto; }
.confirm-modal .modal-foot {
  display: flex; gap: 12px; justify-content: flex-end; padding: 14px 22px;
  border-top: 1px solid var(--border); background: #fff;
}
.confirm-modal .modal-foot .btn { min-width: 110px; justify-content: center; }
.confirm-summary {
  display: flex; flex-wrap: wrap; gap: 10px 22px; margin-bottom: 14px;
  padding: 12px 16px; background: var(--primary-bg); border: 1px solid var(--primary-light);
  border-radius: var(--radius-sm); font-size: 14px; color: var(--gray-700);
}
.confirm-summary strong { color: var(--primary); font-weight: 700; }
.confirm-warn {
  margin-bottom: 14px; padding: 11px 15px; background: #fff7ed; border: 1px solid #fed7aa;
  border-radius: var(--radius-sm); font-size: 13.5px; color: #9a3412; line-height: 1.7;
}
.confirm-preview { border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }

/* ===== 通用表单控件（后台筛选） ===== */
.form-control { height: 38px; padding: 0 12px; border: 1px solid var(--gray-300); border-radius: var(--radius-sm); font-size: 14px; background: #fff; color: var(--gray-700); }
.form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-bg); }

/* ===== 后台礼品：筛选工具栏 ===== */
.admin-gift-toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.admin-gift-toolbar .form-control { width: auto; min-width: 160px; }
.admin-gift-count { font-size: 13px; color: var(--gray-500); margin-left: auto; }

/* ===== 后台礼品：横排列表 ===== */
.gift-table { display: block; overflow-x: auto; border: 1px solid var(--gray-200); border-radius: var(--radius); background: #fff; }
.gift-row { display: grid; grid-template-columns: 56px minmax(0,1fr) 92px 110px 72px 150px; align-items: center; gap: 14px; min-width: 720px; padding: 10px 16px; border-bottom: 1px solid var(--gray-100); transition: background 0.15s; }
.gift-row:last-child { border-bottom: none; }
.gift-row:not(.gift-row-head):hover { background: var(--gray-50); }
.gift-row-head { background: var(--gray-50); font-size: 12px; font-weight: 700; color: var(--gray-500); padding-top: 11px; padding-bottom: 11px; }
.gr-thumb { width: 56px; height: 56px; border-radius: 10px; overflow: hidden; background: linear-gradient(135deg,#f1f5f9,var(--primary-bg)); display: flex; align-items: center; justify-content: center; font-size: 26px; flex-shrink: 0; position: relative; }
.gr-thumb img { width: 100%; height: 100%; object-fit: cover; }
.gr-thumb .att-badge { font-size: 10px; padding: 1px 5px; top: 3px; right: 3px; }
.gr-main { min-width: 0; }
.gr-name { font-size: 15px; font-weight: 700; color: var(--gray-800); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.gr-desc { font-size: 13px; color: var(--gray-500); margin: 3px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gr-meta { font-size: 12px; color: var(--gray-400); }
.gr-points { font-size: 17px; font-weight: 800; color: var(--primary); }
.gr-points span { font-size: 12px; font-weight: 500; color: var(--gray-400); }
.gr-stock { font-size: 13px; color: var(--gray-700); line-height: 1.5; }
.gr-stock .muted { color: var(--gray-400); font-size: 12px; }
.gr-status { text-align: center; }
.gift-status { display: inline-block; padding: 3px 12px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.gift-status.tag-on { background: #dcfce7; color: #15803d; }
.gift-status.tag-off { background: #e2e8f0; color: #64748b; }
.gr-actions { display: flex; gap: 8px; justify-content: flex-end; }
.gr-actions .btn { min-width: 56px; justify-content: center; }

/* ===== 员工商城：搜索 + 排序工具栏 ===== */
.mall-toolbar { display: flex; align-items: center; gap: 12px; margin: 16px 0 14px; flex-wrap: wrap; }
.mall-search { position: relative; flex: 1; min-width: 200px; max-width: 360px; }
.mall-search .search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); font-size: 14px; opacity: 0.6; }
.mall-search input { width: 100%; padding: 10px 12px 10px 34px; border: 1px solid var(--gray-300); border-radius: 999px; font-size: 14px; background: #fff; transition: border-color 0.15s, box-shadow 0.15s; }
.mall-search input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-bg); }
.mall-sort { padding: 10px 14px; border: 1px solid var(--gray-300); border-radius: 999px; font-size: 14px; background: #fff; color: var(--gray-700); cursor: pointer; min-width: 150px; }
.mall-sort:focus { outline: none; border-color: var(--primary); }
.confirm-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.confirm-table thead th {
  position: sticky; top: 0; background: var(--gray-100); color: var(--gray-600);
  font-weight: 600; text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--border); z-index: 1;
}
.confirm-table tbody td { padding: 8px 12px; border-bottom: 1px solid var(--gray-100); color: var(--gray-700); }
.confirm-table tbody tr:last-child td { border-bottom: none; }
.confirm-table tbody tr:hover { background: var(--primary-bg); }

/* ===== 数据看板追加样式（2026-07-26） ===== */
.stat-card.teal::before { background: linear-gradient(90deg, #14b8a6, #5eead4); }
.stat-card.teal .stat-value { color: #0f766e; }
.stat-card.indigo::before { background: linear-gradient(90deg, #6366f1, #a5b4fc); }
.stat-card.indigo .stat-value { color: #4338ca; }

/* 所有滚动表格表头固定（后台/校区各列表格统一） */
.table-wrap table,
.table-scroll table,
.detail-overview-table,
.points-log-table { border-collapse: separate; border-spacing: 0; }
.table-wrap table thead th,
.table-scroll table thead th,
.detail-overview-table thead th,
.points-log-table thead th {
  position: -webkit-sticky; position: sticky; top: 0;
  background: var(--gray-50); z-index: 2;
  box-shadow: 0 1px 0 var(--border);
}

/* 数量小标签 */
.count-badge {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 2px 10px; border-radius: 12px;
  background: var(--primary-bg); color: var(--primary);
  font-size: 12.5px; font-weight: 600;
}

/* 带数量标签的卡片标题 */
.title-with-count { justify-content: space-between; }
.title-with-count::before { margin-right: 9px; flex-shrink: 0; }
.title-with-count > span:first-child { flex: 1; }

/* 商城维护统计 */
.gift-stats {
  display: inline-flex; align-items: center; gap: 14px;
  font-size: 13px; color: var(--gray-500);
}
.gift-stats strong { color: var(--gray-800); font-weight: 700; margin-left: 3px; }
.gift-stats .text-success { color: var(--success); }
.gift-stats .text-muted { color: var(--gray-400); }

/* 积分大类网格展示 */
.category-section { margin-bottom: 18px; }
.category-section:last-child { margin-bottom: 0; }
.category-title {
  font-size: 14px; font-weight: 700; color: var(--gray-700);
  margin-bottom: 10px; padding-left: 4px;
}
.category-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
@media (max-width: 900px) {
  .category-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .category-grid { grid-template-columns: 1fr; }
}
.category-card {
  background: #fff;
  border: 1px solid var(--gray-100);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.category-name {
  font-size: 12.5px; color: var(--gray-600); line-height: 1.35;
  min-height: 34px;
}
.category-bar { height: 6px; background: var(--gray-100); border-radius: 3px; overflow: hidden; }
.category-val {
  font-size: 15px; font-weight: 700; color: var(--gray-800); text-align: right;
}

/* ===== 商城维护：视图切换（列表 / 大图 / 小图） 2026-07-28 ===== */
.view-toggle { display: inline-flex; background: var(--gray-100); border-radius: 10px; padding: 3px; gap: 2px; }
.vt-btn {
  border: none; background: transparent; padding: 6px 13px; border-radius: 8px;
  font-size: 13px; font-weight: 600; color: var(--gray-500); cursor: pointer; transition: all .15s; white-space: nowrap;
}
.vt-btn:hover { color: var(--gray-800); }
.vt-btn.active { background: #fff; color: var(--primary); box-shadow: 0 1px 3px rgba(15,23,42,.12); }

/* 全局 muted 说明文字（模态标签用） */
.muted { color: var(--gray-400); font-weight: 400; font-size: 12px; }

/* ===== 拖拽排序：手柄与拖拽态 ===== */
.gr-thumb.drag-handle { cursor: grab; }
.gr-thumb.drag-handle::before {
  content: '⋮⋮'; position: absolute; top: 1px; left: 4px; z-index: 3;
  font-size: 12px; letter-spacing: -2px; color: rgba(255,255,255,.95); text-shadow: 0 1px 2px rgba(0,0,0,.45);
}
.gc-handle {
  position: absolute; top: 8px; right: 8px; z-index: 4; width: 28px; height: 28px;
  border-radius: 8px; background: rgba(15,23,42,.45); color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 14px; cursor: grab; line-height: 1;
}
.dragging { opacity: .45; }
.drag-over { outline: 2px dashed var(--primary); outline-offset: -3px; background: var(--primary-bg) !important; }

/* 列表视图备注行（仅管理员可见） */
.gr-remark {
  font-size: 12px; color: var(--gray-600); margin-top: 5px; background: var(--gray-50);
  border: 1px dashed var(--gray-200); border-radius: 6px; padding: 5px 8px;
}

/* ===== 后台礼品卡片网格 ===== */
.gift-card-admin {
  background: #fff; border: 1px solid var(--gray-200); border-radius: 14px; overflow: hidden;
  transition: all .2s; position: relative; display: flex; flex-direction: column; box-shadow: var(--shadow);
}
.gift-card-admin:hover { box-shadow: var(--shadow-lg); border-color: var(--primary-light); transform: translateY(-3px); }
.gift-card-admin .gc-thumb {
  width: 100%; aspect-ratio: 1 / 1; display: flex; align-items: center; justify-content: center;
  font-size: 56px; background: linear-gradient(135deg, #f1f5f9 0%, var(--primary-bg) 100%); position: relative;
}
.gift-card-admin .gc-thumb img { width: 100%; height: 100%; object-fit: cover; }
.gift-card-admin .gc-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.gift-card-admin .gc-name { font-size: 15px; font-weight: 700; color: var(--gray-800); line-height: 1.4; }
.gift-card-admin .gc-meta { font-size: 12px; color: var(--gray-400); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.gift-card-admin .gc-remark {
  font-size: 12px; color: var(--gray-600); background: var(--gray-50);
  border: 1px dashed var(--gray-200); border-radius: 8px; padding: 6px 8px;
}
.gift-card-admin .gc-bottom { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; margin-top: 2px; }
.gift-card-admin .gc-points { font-size: 20px; font-weight: 800; color: #e1251b; line-height: 1; }
.gift-card-admin .gc-points span { font-size: 12px; font-weight: 500; color: #e1251b; opacity: .85; }
.gift-card-admin .gc-stock { font-size: 12px; color: var(--gray-500); }
.gift-card-admin .gc-stock.out { color: var(--danger); font-weight: 600; }
.gift-card-admin .gc-status { margin-top: 1px; }
.gift-card-admin .gc-actions { display: flex; gap: 8px; margin-top: 8px; }
.gift-card-admin .gc-actions .btn { flex: 1; }

/* 尺寸修饰 */
.gift-card-admin.lg .gc-thumb { font-size: 66px; }
.gift-card-admin.sm .gc-thumb { font-size: 40px; }

/* 员工端大图/小图容器：统一 1:1 正方形（与后台一致），图片 cover 填满 */
.gift-grid.lg { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
.gift-grid.lg .gift-image { aspect-ratio: 1 / 1; }
.gift-grid.sm { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.gift-grid.sm .gift-image { aspect-ratio: 1 / 1; }
.gift-card-admin.sm .gc-name { font-size: 13.5px; }
.gift-card-admin.sm .gc-body { padding: 9px 10px 11px; gap: 4px; }
.gift-card-admin.sm .gc-actions .btn { padding: 5px 8px; font-size: 12px; }
.gift-grid.sm .gift-card .btn-sm,
.gift-grid.sm .gift-list-item .btn-sm {
  padding: 5px 8px; font-size: 12px; white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; min-width: 0; max-width: 100%;
}
.gift-grid.sm .gift-card.auction .btn-sm { font-size: 11px; padding: 5px 6px; }
.gift-grid.sm .auc-price { font-size: 17px; }
.gift-grid.sm .auc-meta { font-size: 10.5px; gap: 3px 8px; margin-top: 6px; }
.gift-grid.sm .auc-mine { font-size: 10.5px; padding: 5px 8px; }

/* ===== 员工端商城视图模式（列表 / 大图 / 小图）===== */
/* 通用列宽已在 .gift-grid.lg/.sm 定义，这里补充员工卡片的尺寸表现 */
.gift-grid.lg .gift-name { font-size: 16.5px; }
.gift-grid.lg .gift-card { border-width: 1.5px; }
/* 大图/小图的图片容器与网格列宽统一在上方 .gift-grid.lg/.sm 中定义 */
.gift-grid.sm .gift-card { border-radius: 12px; }
.gift-grid.sm .gift-body { padding: 9px 10px 11px; gap: 3px; }
.gift-grid.sm .gift-name { font-size: 13.5px; }
.gift-grid.sm .gift-desc { display: none; }
.gift-grid.sm .gift-points { font-size: 17px; }
.gift-grid.sm .gift-bottom { margin-top: 2px; }
.gift-grid.sm .gift-stock { font-size: 11px; margin-top: 2px; }
.gift-grid.sm .gift-card .btn-sm { padding: 5px 8px; font-size: 12px; }

/* 列表视图：单列，横向一行（图片 + 信息 + 操作） */
.gift-grid.list { display: flex; flex-direction: column; gap: 12px; }
.gift-list-item {
  display: flex; align-items: stretch; gap: 14px;
  background: #fff; border: 1px solid var(--gray-200); border-radius: 12px;
  padding: 12px; box-shadow: var(--shadow); transition: all 0.2s;
}
.gift-list-item:hover { box-shadow: var(--shadow-lg); border-color: var(--primary-light); }
.gift-list-item.disabled { opacity: 0.6; }
.gift-list-item .gli-thumb {
  position: relative; width: 110px; aspect-ratio: 1 / 1; flex-shrink: 0;
  border-radius: 10px; overflow: hidden;
  display: flex; align-items: center; justify-content: center; font-size: 56px;
  background: #fff;
}
.gift-list-item .gli-thumb img { width: 100%; height: 100%; object-fit: cover; }
.gift-list-item .gli-body {
  flex: 1; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-width: 0;
}
.gift-list-item .gli-main { flex: 1; min-width: 0; }
.gift-list-item .gift-name { font-size: 15.5px; font-weight: 700; color: var(--gray-800); line-height: 1.4; }
.gift-list-item .gift-desc {
  font-size: 12.5px; color: var(--gray-500); margin: 6px 0 8px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.gift-list-item .gift-stock { font-size: 12px; color: var(--gray-500); }
.gift-list-item .gift-stock.out { color: var(--danger); font-weight: 600; }
.gift-list-item .gli-right {
  display: flex; flex-direction: column; align-items: flex-end; justify-content: center; gap: 8px;
  flex-shrink: 0;
}
.gift-list-item .gift-points { font-size: 22px; font-weight: 800; color: #e1251b; line-height: 1; }
.gift-list-item .gift-points span { font-size: 12px; font-weight: 500; color: #e1251b; opacity: 0.85; }
.gift-list-item .btn-sm { min-width: 78px; justify-content: center; }

/* 积分不足：图片与字体正常，不加蒙版；仅缺货(.disabled)才做淡化处理 */
.gift-card.disabled .gift-image { filter: none; }

/* ===== 后台图片裁剪（微信头像式）===== */
.crop-stage {
  position: relative; width: 300px; height: 300px; margin: 0 auto;
  overflow: hidden; border-radius: 14px; background: #0f172a;
  touch-action: none; cursor: grab; user-select: none;
}
.crop-stage.dragging { cursor: grabbing; }
.crop-stage img.crop-img {
  position: absolute; left: 0; top: 0; transform-origin: top left;
  will-change: transform; pointer-events: none; max-width: none;
}
/* 圆形取景遮罩（仅视觉引导，实际输出为正方形） */
.crop-stage::after {
  content: ''; position: absolute; left: 50%; top: 50%;
  width: 260px; height: 260px; transform: translate(-50%, -50%);
  border-radius: 50%; box-shadow: 0 0 0 9999px rgba(15, 23, 42, 0.55);
  border: 2px solid rgba(255, 255, 255, 0.9); pointer-events: none;
}
.crop-zoom { display: flex; align-items: center; gap: 10px; margin: 14px auto 0; max-width: 300px; }
.crop-zoom input[type=range] { flex: 1; }
.crop-zoom .cz-label { font-size: 12px; color: var(--gray-500); white-space: nowrap; }
.crop-tips { text-align: center; font-size: 12px; color: var(--gray-400); margin-top: 8px; }

/* ===================================================================
   积分竞拍专区（与普通兑换区做强视觉区分：琥珀金主色 + 🔨 标识）
   =================================================================== */
:root {
  --auction: #d97706;
  --auction-dark: #b45309;
  --auction-light: #fef3c7;
  --auction-bg: #fffbeb;
  --auction-border: #fcd34d;
}
.text-auction { color: var(--auction); }

/* 专区外框 */
.auction-section {
  border: 2px solid var(--auction-border);
  background: linear-gradient(180deg, var(--auction-bg) 0%, #fff 120px);
  box-shadow: 0 4px 18px rgba(217, 119, 6, 0.10);
}
.auction-section .card-title { color: var(--auction-dark); }
.auction-banner {
  display: flex; align-items: center; gap: 16px; padding: 16px 20px; margin-bottom: 16px;
  border-radius: 14px; color: #fff;
  background: linear-gradient(120deg, #b45309 0%, #d97706 45%, #f59e0b 100%);
  box-shadow: 0 6px 18px rgba(180, 83, 9, 0.28);
}
.auction-banner .ab-icon { font-size: 34px; line-height: 1; }
.auction-banner .ab-title { font-size: 16px; font-weight: 800; letter-spacing: 0.3px; }
.auction-banner .ab-sub { font-size: 12.5px; opacity: 0.94; margin-top: 4px; line-height: 1.6; }
.auction-rule-bar {
  display: flex; flex-wrap: wrap; gap: 8px 18px; padding: 10px 14px; margin-bottom: 14px;
  background: var(--auction-bg); border: 1px dashed var(--auction-border); border-radius: 10px;
  font-size: 12.5px; color: var(--auction-dark);
}
.auction-rule-bar b { color: var(--auction-dark); }

/* 礼品兑换专区 banner/rule-bar（与竞拍专区结构统一，蓝色主题） */
.gift-banner {
  display: flex; align-items: center; gap: 16px; padding: 16px 20px; margin-bottom: 16px;
  border-radius: 14px; color: #fff;
  background: linear-gradient(120deg, #1d4ed8 0%, #3b82f6 45%, #60a5fa 100%);
  box-shadow: 0 6px 18px rgba(29, 78, 216, 0.28);
}
.gift-banner .gb-icon { font-size: 34px; line-height: 1; }
.gift-banner .gb-title { font-size: 16px; font-weight: 800; letter-spacing: 0.3px; }
.gift-banner .gb-sub { font-size: 12.5px; opacity: 0.94; margin-top: 4px; line-height: 1.6; }
.gift-rule-bar {
  display: flex; flex-wrap: wrap; gap: 8px 18px; padding: 10px 14px; margin-bottom: 14px;
  background: #eff6ff; border: 1px dashed #93c5fd; border-radius: 10px;
  font-size: 12.5px; color: #1e40af;
}
.gift-rule-bar b { color: #1e3a8a; }

/* 竞拍卡片 */
.gift-card.auction, .gift-list-item.auction {
  border-color: var(--auction-border);
  background: linear-gradient(180deg, #fffdf5 0%, #fff 60%);
}
.gift-card.auction:hover { border-color: var(--auction); box-shadow: 0 10px 26px rgba(217, 119, 6, 0.18); }
.gift-list-item.auction:hover { border-color: var(--auction); }
.auc-flag {
  position: absolute; left: 0; top: 12px; z-index: 2;
  padding: 4px 10px 4px 8px; border-radius: 0 999px 999px 0;
  background: linear-gradient(90deg, #b45309, #f59e0b); color: #fff;
  font-size: 11px; font-weight: 700; letter-spacing: 0.4px;
  box-shadow: 0 2px 8px rgba(180, 83, 9, 0.35);
}
.auc-rank-flag {
  position: absolute; right: 8px; top: 12px; z-index: 2;
  padding: 4px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; color: #fff;
  background: rgba(15, 23, 42, 0.72);
}
.auc-rank-flag.win { background: linear-gradient(90deg, #15803d, #22c55e); }
.auc-rank-flag.out { background: linear-gradient(90deg, #9f1239, #e11d48); }
.gli-thumb { position: relative; }
.gift-image { position: relative; }

/* 竞拍价格与信息条 */
.auc-price { font-size: 22px; font-weight: 800; color: var(--auction-dark); line-height: 1; }
.auc-price span { font-size: 12px; font-weight: 600; opacity: 0.85; }
.auc-meta {
  display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 8px;
  font-size: 11.5px; color: var(--gray-600);
}
.auc-meta b { color: var(--auction-dark); font-weight: 700; }
.auc-progress { height: 5px; border-radius: 999px; background: var(--gray-200); overflow: hidden; margin-top: 8px; }
.auc-progress i { display: block; height: 100%; background: linear-gradient(90deg, #f59e0b, #b45309); }
.auc-mine {
  margin-top: 8px; padding: 6px 10px; border-radius: 8px; font-size: 11.5px; font-weight: 600;
  background: var(--auction-light); color: var(--auction-dark); border: 1px solid var(--auction-border);
}
.auc-mine.win { background: var(--success-light); color: #15803d; border-color: #86efac; }
.auc-mine.out { background: var(--danger-light); color: var(--danger); border-color: #fda4af; }

/* 竞拍按钮：与普通「立即兑换」蓝色按钮明确区分 */
.btn-auction {
  background: linear-gradient(120deg, #b45309, #f59e0b); color: #fff; border: none;
  box-shadow: 0 2px 8px rgba(180, 83, 9, 0.28);
}
.btn-auction:hover:not(:disabled) { background: linear-gradient(120deg, #92400e, #d97706); box-shadow: 0 4px 12px rgba(180, 83, 9, 0.36); }
.btn-auction:disabled { background: var(--gray-200); color: var(--gray-400); box-shadow: none; }

/* 竞拍出价弹窗 */
.bid-modal .modal-info { background: var(--auction-bg); border: 1px solid var(--auction-border); }
.bid-ladder { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 4px; }
.bid-ladder .bl-btn {
  padding: 6px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 700; cursor: pointer;
  border: 1px solid var(--auction-border); background: #fff; color: var(--auction-dark);
}
.bid-ladder .bl-btn:hover { background: var(--auction-light); }
.bid-ladder .bl-btn.active { background: var(--auction); color: #fff; border-color: var(--auction); }
.bid-rank-tip {
  margin-top: 12px; padding: 10px 12px; border-radius: 10px; font-size: 12.5px; line-height: 1.7;
  background: var(--auction-bg); border: 1px solid var(--auction-border); color: var(--auction-dark);
}
.bid-rank-tip .brt-big { font-size: 15px; font-weight: 800; }
.bid-rank-tip.win { background: var(--success-light); border-color: #86efac; color: #15803d; }
.bid-rank-tip.win .brt-big { color: #15803d; }
.bid-rank-tip.out { background: #fff1f2; border-color: #fda4af; color: #9f1239; }
.bid-rank-tip.out .brt-big { color: #9f1239; }
.auc-locked-tip {
  display: inline-block; font-size: 12px; line-height: 1.5;
  color: var(--auction-dark); background: var(--auction-bg);
  border: 1px dashed var(--auction-border); padding: 4px 9px; border-radius: 7px;
}
.bid-board { margin-top: 12px; max-height: 190px; overflow: auto; border: 1px solid var(--gray-200); border-radius: 10px; }
.bid-board table { width: 100%; font-size: 12px; }
.bid-board th { position: sticky; top: 0; background: var(--gray-50); z-index: 1; }
.bid-board tr.me { background: var(--auction-light); font-weight: 700; }

/* 兑换记录中的竞拍标记 */
.tag-auction { background: var(--auction-light); color: var(--auction-dark); }
.tag-out { background: var(--gray-200); color: var(--gray-600); }
.rank-chip {
  display: inline-flex; align-items: center; gap: 3px; margin-left: 6px;
  padding: 1px 7px; border-radius: 999px; font-size: 11px; font-weight: 700;
  background: var(--auction-light); color: var(--auction-dark);
}
.rank-chip.win { background: var(--success-light); color: #15803d; }
.rank-chip.out { background: var(--gray-200); color: var(--gray-500); }

/* 后台：竞拍设置区块与列表标识 */
.auction-box {
  border: 1px solid var(--auction-border); background: var(--auction-bg);
  border-radius: 12px; padding: 16px; margin: 4px 0 8px;
}
.auction-box-head { font-size: 13.5px; font-weight: 800; color: var(--auction-dark); margin-bottom: 12px; }
.auction-box .form-grid { gap: 12px; }
/* 竞拍截止时间：下拉选择 */
.auc-datetime { display: flex; flex-direction: column; gap: 8px; }
.auc-dt-enable { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--gray-700); cursor: pointer; }
.auc-dt-enable input { width: 16px; height: 16px; }
.auc-dt-fields { display: flex; flex-direction: column; gap: 8px; }
.auc-dt-fields.disabled { opacity: .5; pointer-events: none; }
.auc-dt-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.auc-dt-row select { width: auto; min-width: 78px; padding: 8px 10px; }
.auc-dt-row span { font-size: 13px; color: var(--gray-600); }
.auction-box-tip {
  margin-top: 10px; padding: 8px 12px; border-radius: 8px; font-size: 12px; line-height: 1.7;
  background: #fff; border: 1px dashed var(--auction-border); color: var(--gray-700);
}
.readonly-input { background: var(--gray-100) !important; color: var(--gray-500) !important; cursor: not-allowed; }
.mode-badge {
  display: inline-flex; align-items: center; padding: 1px 8px; border-radius: 999px;
  font-size: 11px; font-weight: 700; margin-left: 6px;
  background: var(--auction-light); color: var(--auction-dark); border: 1px solid var(--auction-border);
}
.mode-badge.settled { background: var(--gray-200); color: var(--gray-600); border-color: var(--gray-300); }
.gift-row.is-auction { border-left: 3px solid var(--auction); background: linear-gradient(90deg, var(--auction-bg), #fff 220px); }
.gift-card-admin.is-auction { border-color: var(--auction-border); }
.gc-auc-flag {
  position: absolute; left: 6px; top: 6px; z-index: 2; padding: 2px 8px; border-radius: 999px;
  font-size: 10.5px; font-weight: 700; color: #fff; background: linear-gradient(90deg, #b45309, #f59e0b);
}
.gc-thumb { position: relative; }
.gr-auc { font-size: 11.5px; color: var(--auction-dark); margin-top: 4px; font-weight: 600; }
.auction-sum { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 13px; color: var(--gray-600); }
.auction-sum b { color: var(--gray-800); }
tr.row-win { background: rgba(22, 163, 74, 0.06); }
tr.row-out { color: var(--gray-400); }

/* 兑换记录页 Tab */
.redeem-tabs { display: flex; gap: 8px; border-bottom: 2px solid var(--gray-200); }
.redeem-tab {
  padding: 10px 18px; font-size: 14px; font-weight: 600; color: var(--gray-500);
  background: transparent; border: none; border-bottom: 2px solid transparent;
  cursor: pointer; margin-bottom: -2px;
}
.redeem-tab.active { color: var(--primary); border-bottom-color: var(--primary); background: rgba(37,99,235,0.06); }

/* 统计面板 chip */
.stat-chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px; border-radius: 999px; font-size: 12px;
  background: var(--gray-100); color: var(--gray-600); margin: 2px 4px 2px 0;
}
.stat-chip b { color: var(--gray-800); }

/* 回收站/已删除行 */
tr.deleted-row { background: rgba(100,116,139,0.06); color: var(--gray-500); }

/* 竞拍倒计时 */
.auc-countdown { font-weight: 700; }
.auc-countdown.normal { color: var(--success); }
.auc-countdown.soon { color: #d97706; }
.auc-countdown.urgent { color: #dc2626; animation: pulse 1.2s infinite; }
.auc-countdown.manual { color: var(--gray-500); }
.auc-countdown.ended { color: var(--gray-400); animation: none; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.55; } }

/* 弹窗/抽屉打开时锁定底层页面，禁止滚动 */
body.modal-open {
  position: fixed;
  width: 100%;
  height: 100%;
  overflow: hidden;
  touch-action: none;
}

/* ===== 员工端移动端适配（2026-08-05） ===== */
@media (max-width: 768px) {
  .container { padding: 18px 14px 48px; max-width: 100%; }
  .header-inner { flex-direction: column; align-items: stretch; gap: 10px; padding: 12px 14px; max-width: 100%; }
  .header-title { font-size: 14px; line-height: 1.35; word-break: break-word; }
  .header-sub { font-size: 13px; }
  #header-balance { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
  #header-balance .hb-label { color: var(--gray-500); }
  #header-balance .hb-num { font-weight: 700; color: var(--primary); }
  .header-nav { justify-content: flex-start; gap: 6px 16px; }
  .header-right { width: 100%; justify-content: space-between; }

  .section-header { font-size: 17px; }
  .ab-icon, .gb-icon { font-size: 30px; }
  .auction-banner, .gift-banner { flex-direction: column; align-items: flex-start; gap: 8px; padding: 14px 16px; text-align: left; }
  .auction-rule-bar, .gift-rule-bar { flex-direction: column; align-items: flex-start; gap: 6px; font-size: 12.5px; padding: 12px 14px; }
  .auction-rule-bar span, .gift-rule-bar span { width: 100%; }

  .mall-toolbar { flex-direction: column; align-items: stretch; gap: 10px; }
  .mall-search, .mall-sort { max-width: none; width: 100%; min-width: 0; }
  .view-toggle, .mall-toolbar .view-toggle { display: none !important; }

  .gift-grid, .gift-grid.lg, .gift-grid.sm, .gift-grid.list { display: grid !important; grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .gift-card { padding: 14px; }
  .gift-emoji { font-size: 34px; }
  /* 小图双列下：价格与按钮上下排，避免横向挤爆 */
  .gift-grid.sm .gift-bottom,
  .gift-grid .gift-bottom { flex-direction: column; align-items: flex-start; gap: 6px; }
  .gift-grid.sm .gift-bottom .btn-sm,
  .gift-grid .gift-bottom .btn-sm { width: 100%; white-space: nowrap; font-size: 12px; padding: 6px 8px; }
  /* 竞拍信息：字号随屏幕宽度平滑缩放，关键数字不换行 */
  .gift-grid.sm .auc-price,
  .gift-grid .auc-price { font-size: clamp(14px, 4.2vw, 17px); white-space: nowrap; }
  .gift-grid.sm .auc-price span,
  .gift-grid .auc-price span { font-size: 10px; }
  .gift-grid.sm .auc-meta,
  .gift-grid .auc-meta { font-size: 10px; gap: 4px 6px; }
  .gift-grid.sm .auc-meta span,
  .gift-grid .auc-meta span { white-space: nowrap; }
  .gift-grid.sm .auc-mine,
  .gift-grid .auc-mine { font-size: 10px; padding: 4px 6px; line-height: 1.35; }

  .drawer { width: 92vw; max-width: 100%; }
  .drawer-body { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  #my-redemptions { min-width: 560px; }

  .modal { width: 92vw; max-width: 460px; max-height: 88vh; overflow-y: auto; }
  .modal-actions { flex-wrap: wrap; }
  .modal-actions .btn { flex: 1; min-width: 120px; }

  .notif-panel, .user-dropdown { right: 0; left: auto; width: min(320px, 86vw); }

  input, select, textarea { font-size: 16px; }
  .btn, .btn-sm, .redeem-tab, .mall-sort { min-height: 40px; }

  /* 兑换状态说明：小屏下单列，标签与说明顶部对齐 */
  .redeem-status-help .help-grid { grid-template-columns: 1fr; gap: 8px; }
  .redeem-status-help .help-grid > div { align-items: flex-start; }
}

@media (max-width: 560px) {
  .header-title { font-size: 13px; }
  #header-balance .hb-label, #header-balance .hb-name { display: none; }
  .gift-grid, .gift-grid.lg, .gift-grid.sm, .gift-grid.list { display: grid !important; grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .gift-card { padding: 12px; }
  .ab-icon, .gb-icon { font-size: 28px; }
  .auction-banner, .gift-banner { padding: 12px 14px; }
  .section-header { font-size: 16px; }
}

@media (max-width: 380px) {
  .gift-grid, .gift-grid.lg, .gift-grid.sm, .gift-grid.list { display: grid !important; grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .gift-card { padding: 10px; }
  .gift-emoji { font-size: 30px; }
}

/* ===== 整体视觉美化增强（2026-08-06） ===== */

/* 卡片：更柔和阴影 + 悬停上浮 */
.card {
  border-radius: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 8px 24px rgba(15,23,42,0.06);
  padding: 28px;
}
.card:hover {
  box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 12px 32px rgba(15,23,42,0.1);
  transform: translateY(-1px);
}

/* 统计卡片增强 */
.stat-card {
  border-radius: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 8px 24px rgba(15,23,42,0.06);
  transition: box-shadow 0.2s, transform 0.2s;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(15,23,42,0.1); }

/* 标签更精致 */
.tag {
  border: 1px solid rgba(0,0,0,0.04);
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
  padding: 4px 12px;
  letter-spacing: 0.2px;
}

/* 表格行：hover 更明显 + 首列圆角感 */
table tbody tr { transition: background 0.18s, box-shadow 0.18s; }
table tbody tr:nth-child(even) { background: #f8fafc; }
table tbody tr:hover { background: #eef4ff; box-shadow: inset 3px 0 0 var(--primary); }
table td { padding: 14px 16px; }

/* 按钮圆角统一 + 微立体 */
.btn { border-radius: 10px; }
.btn-sm { border-radius: 8px; }
.btn-primary { box-shadow: 0 4px 14px rgba(37,99,235,0.35); }
.btn-success { box-shadow: 0 4px 14px rgba(22,163,74,0.32); }
.btn-danger { box-shadow: 0 4px 14px rgba(225,29,72,0.28); }
.btn-warning { box-shadow: 0 4px 14px rgba(245,158,11,0.32); }

/* 输入框聚焦光环更柔和 */
.search-field input:focus, .search-field select:focus,
input:focus, select:focus, textarea:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
}

/* 区域标题装饰线 */
.section-header .title {
  position: relative;
  padding-left: 14px;
}
.section-header .title::before {
  content: '';
  position: absolute;
  left: 0; top: 50%; transform: translateY(-50%);
  width: 5px; height: 20px;
  background: linear-gradient(180deg, var(--primary), var(--primary-dark));
  border-radius: 3px;
}

/* Banner 图标容器更精致 */
.auction-banner, .gift-banner {
  border-radius: 14px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.06);
}
.auction-banner .ab-icon, .gift-banner .gb-icon {
  width: 54px; height: 54px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 14px;
  background: rgba(255,255,255,0.22);
  backdrop-filter: blur(4px);
}

/* 空状态更柔和 */
.empty-state {
  background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
  border-radius: 16px;
  border: 1px dashed var(--gray-200);
}
.empty-state .icon {
  filter: grayscale(0.2);
  opacity: 0.85;
}

/* Tab 更圆润 */
.redeem-tab {
  border-radius: 8px 8px 0 0;
  transition: all 0.18s;
}
.redeem-tab:hover { background: rgba(37,99,235,0.04); }

/* 礼品卡片更精致 */
.gift-card {
  border-radius: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 6px 18px rgba(15,23,42,0.05);
  transition: transform 0.2s, box-shadow 0.2s;
}
.gift-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(15,23,42,0.1);
}

/* 兑换/竞拍角标更立体 */
.rank-chip, .auc-rank-flag {
  border: 1px solid rgba(0,0,0,0.05);
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

/* 移动端也保持圆角与阴影 */
@media (max-width: 768px) {
  .card { border-radius: 14px; padding: 20px; }
  .auction-banner, .gift-banner { border-radius: 12px; }
  .gift-card { border-radius: 14px; }
}
