:root {
  /* Light theme palette - Liquid Glass (Glassmorphism) */
  --bg: #eef3f8;
  --card: rgba(255, 255, 255, 0.5);
  --muted: #5b6472;
  --text: #0f172a;
  --primary: #0ea5e9;
  /* sky-500 */
  --primary-700: #0369a1;
  /* sky-800 */
  --danger: #dc2626;
  --border: rgba(255, 255, 255, 0.35);
  --shadow: 0 12px 40px rgba(15, 23, 42, 0.12);
  --acrylic-blur: 20px;
  --glass-highlight: rgba(255, 255, 255, 0.85);
  --glass-edge: rgba(255, 255, 255, 0.55);
  --glass-edge-dark: rgba(15, 23, 42, 0.06);
  --brand-size: 34px;
}

* {
  box-sizing: border-box
}

html,
body {
  height: 100%
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(60% 100% at 20% -10%, rgba(14, 165, 233, 0.20), rgba(14, 165, 233, 0) 60%),
    radial-gradient(60% 100% at 100% 10%, rgba(99, 102, 241, 0.18), rgba(99, 102, 241, 0) 55%),
    linear-gradient(180deg, #f8fafc, #eef2f7 40%, #eaf0f7 100%);
  position: relative;
  /* 更紧凑的侧边栏尺寸 */
  --side-nav-collapsed: 64px;
  --side-nav-expanded: 210px;
  --side-nav-width: 0;
}

body:not(.sidebar-open) .side-nav {
  width: var(--side-nav-collapsed);
}

body.sidebar-open .side-nav {
  width: var(--side-nav-expanded);
}

.btn {
  appearance: none;
  border: 1px solid var(--glass-edge);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.28));
  color: var(--text);
  padding: 8px 12px;
  border-radius: 12px;
  cursor: pointer;
  transition: .2s;
  backdrop-filter: blur(10px) saturate(120%);
  box-shadow: inset 0 1px 0 var(--glass-highlight), 0 6px 18px rgba(15, 23, 42, 0.10);
}

.btn-close {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(220, 38, 38, 0.3);
  background: linear-gradient(135deg, #fca5a5, #ef4444);
  color: #fff;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 8px 18px rgba(220, 38, 38, 0.25);
}

.btn:hover {
  border-color: var(--primary);
  box-shadow: inset 0 1px 0 var(--glass-highlight), 0 8px 22px rgba(14, 165, 233, 0.22)
}

.btn-close:hover {
  border-color: #dc2626;
  box-shadow: 0 10px 24px rgba(220, 38, 38, 0.35);
}

.btn-close:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.9);
  outline-offset: 2px;
}

.btn-close span {
  pointer-events: none;
  font-size: 16px;
  transform: translateY(-1px);
}

.btn.primary {
  background: linear-gradient(135deg, var(--primary), #60a5fa);
  color: white;
  font-weight: 600;
  border-color: transparent;
  box-shadow: 0 6px 20px rgba(14, 165, 233, 0.25);
}

.btn.danger {
  background: linear-gradient(135deg, #fecaca, var(--danger));
  color: white;
  font-weight: 600;
  border-color: transparent;
  box-shadow: 0 6px 20px rgba(220, 38, 38, 0.22);
}

.import-label {
  display: inline-flex;
  align-items: center;
  gap: 6px
}

.btn.ghost {
  background: rgba(255, 255, 255, 0.32);
  border-color: transparent;
  box-shadow: none;
}

.btn.ghost:hover {
  border-color: rgba(14, 165, 233, 0.35);
  box-shadow: 0 8px 18px rgba(14, 165, 233, 0.18);
}

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.app-shell {
  display: flex;
  min-height: 100vh;
  position: relative;
}

.side-nav {
  width: var(--side-nav-width);
  transition: width .35s ease, transform .35s ease;
  background:
    radial-gradient(110% 130% at 0% 0%, rgba(14, 165, 233, 0.30), rgba(14, 165, 233, 0) 65%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.58));
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-right: 1px solid rgba(255, 255, 255, 0.45);
  box-shadow: 0 28px 48px rgba(15, 23, 42, 0.18);
  /* 与导航同层级，随页面滚动保持固定位置（不跟随内容滚动） */
  position: sticky;
  top: 0;
  align-self: flex-start;
  height: 100vh;
  z-index: 15;
  overflow: visible;
  /* allow tooltips to overflow and not be clipped */
}

.side-nav-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 10px 10px;
  gap: 12px;
  overflow: visible;
}

.side-scroll {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  gap: 10px;
  padding-right: 2px;
  margin-top: 4px;
  overflow: visible;
}

.side-scroll::-webkit-scrollbar {
  width: 4px;
}

.side-scroll::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.45);
  border-radius: 999px;
}

.side-nav-header {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 40px;
}

.side-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
  white-space: nowrap;
  cursor: pointer;
  transition: transform .2s ease;
  background: transparent;
  border: none;
  padding: 0;
  color: inherit;
  font: inherit;
}

.side-brand:hover {
  transform: translateX(2px);
}

.side-brand:focus-visible {
  outline: 2px solid rgba(14, 165, 233, 0.6);
  outline-offset: 4px;
}

.brand-logo {
  width: var(--brand-size);
  height: var(--brand-size);
  border-radius: 50%;
  background: linear-gradient(135deg, #0ea5e9, #6366f1);
  color: #fff;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: .4px;
}

.brand-text {
  font-weight: 700;
  color: var(--primary-700);
  font-size: 15px;
  letter-spacing: .4px;
}

.tabs {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0;
  border: none;
  background: transparent;
  position: static;
}

.tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.36);
  color: var(--text);
  width: 100%;
  justify-content: flex-start;
  transition: all .2s ease;
  font-size: 14px;
}

.tab:hover {
  transform: translateX(4px);
  border-color: rgba(14, 165, 233, 0.35);
  box-shadow: 0 6px 18px rgba(14, 165, 233, 0.18);
}

.tab.active {
  border-color: var(--primary);
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.18), rgba(14, 165, 233, 0.45));
  color: var(--primary-700);
  box-shadow: 0 10px 24px rgba(14, 165, 233, 0.28);
}

.tab-icon {
  font-size: 18px;
  display: inline-flex;
  width: 26px;
  height: 26px;
  justify-content: center;
  align-items: center;
  line-height: 1;
}

.tab-label {
  white-space: nowrap;
  transition: opacity .2s ease;
}

.side-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.65), transparent);
}

.side-link-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}

.side-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 14px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.28);
  cursor: pointer;
  color: var(--text);
  transition: all .2s ease;
}

.side-link:hover {
  transform: translateX(4px);
  border-color: rgba(14, 165, 233, 0.3);
  box-shadow: 0 8px 20px rgba(14, 165, 233, 0.18);
}

.side-link .tab-icon {
  font-size: 18px;
  display: inline-flex;
  width: 26px;
  height: 26px;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* 侧边栏按钮悬停提示（自定义 tooltip） */
.side-nav .tab,
.side-nav .side-link,
.side-nav .side-brand {
  position: relative;
}

/* 侧边栏常规 tooltip（右侧显示） */
.side-nav [data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  left: calc(100% + 8px);
  top: 50%;
  transform: translateY(-50%) translateX(-6px);
  background: rgba(18, 18, 20, 0.95);
  color: #fff;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 13px;
  white-space: nowrap;
  box-shadow: 0 6px 18px rgba(2, 6, 23, 0.28);
  opacity: 0;
  pointer-events: none;
  transition: opacity .12s ease, transform .12s ease;
  z-index: 99999;
  /* make sure tooltip is on top */
}

/* 隐藏侧边栏常规 tooltip 在侧边栏展开时 */
body.sidebar-open .side-nav [data-tooltip]::after {
  display: none;
}

/* 左上角 brand 专用 tooltip：根据展开状态切换文字 */
.side-brand {
  position: relative;
}

.side-brand::after {
  content: attr(data-tooltip-expand);
  position: absolute;
  left: calc(100% + 8px);
  top: 50%;
  transform: translateY(-50%) translateX(-6px);
  background: rgba(18, 18, 20, 0.95);
  color: #fff;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 13px;
  white-space: nowrap;
  box-shadow: 0 6px 18px rgba(2, 6, 23, 0.28);
  opacity: 0;
  pointer-events: none;
  transition: opacity .12s ease, transform .12s ease;
  z-index: 99999;
}

.side-brand:hover::after,
.side-brand:focus::after,
.side-brand:active::after {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

/* 展开时切换为 collapse 文案并仍可显示 */
body.sidebar-open .side-brand::after {
  content: attr(data-tooltip-collapse);
}

/* 保证侧边栏及内部允许 tooltip 溢出显示（之前已设置 overflow:visible） */
.side-nav {
  overflow: visible;
}

.side-nav-inner {
  overflow: visible;
}

.side-scroll {
  overflow: visible;
}

/* 顶部导航按钮 tooltip（与侧边栏一致风格，但显示在下方） */
.app-header [data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  top: calc(100% + 8px);
  transform: translateX(-50%) translateY(-6px);
  background: rgba(18, 18, 20, 0.95);
  color: #fff;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 13px;
  white-space: nowrap;
  box-shadow: 0 6px 18px rgba(2, 6, 23, 0.28);
  opacity: 0;
  pointer-events: none;
  transition: opacity .12s ease, transform .12s ease;
  z-index: 99999;
}

/* 显示规则：仅在悬停时显示（移除 :focus/:active 触发，避免点击后停留） */
.app-header [data-tooltip]:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* 在侧边栏展开时隐藏 header tooltip（用户要求） */
body.sidebar-open .app-header [data-tooltip]::after {
  display: none !important;
}

/* 防止元素 focus 导致 tooltip 卡住：在 focus 时强制隐藏 tooltip（视觉上仍可通过 :hover 显示） */
.app-header [data-tooltip]:focus::after,
.app-header [data-tooltip]:active::after {
  opacity: 0 !important;
  pointer-events: none !important;
  transform: translateX(-50%) translateY(-6px) !important;
}

/* 保证 header 的按钮为 position:relative，以便绝对定位 tooltip */
.app-header .btn.header-link {
  position: relative;
}

/* 在收缩/展开切换时不受裁切（header 通常不裁切，但保底） */
.app-header {
  overflow: visible;
  z-index: 20;
}

/* 小屏隐藏 header tooltip */
@media (max-width:560px) {
  .app-header [data-tooltip]::after {
    display: none;
  }
}

/* 显示时微微移动到右侧（消除初始偏移） */

.side-nav [data-tooltip]:hover::after {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

body:not(.sidebar-open) .side-nav [data-tooltip]::after {
  left: calc(100% + 6px);
  /* 在收缩态更靠近 */
}

@media (max-width: 560px) {
  .side-nav [data-tooltip]::after {
    display: none;
  }
}

body:not(.sidebar-open) .tab-label {
  opacity: 0;
  pointer-events: none;
  width: 0;
}

body:not(.sidebar-open) .side-brand .brand-text {
  display: none;
}

body:not(.sidebar-open) .side-nav-inner {
  padding: 14px 10px;
  align-items: center;
}

body:not(.sidebar-open) .side-scroll {
  align-items: center;
  overflow-y: visible;
  gap: 8px;
  padding: 0;
  margin-top: 8px;
}

body:not(.sidebar-open) .side-divider {
  width: 34px;
  margin: 4px 0;
}

body:not(.sidebar-open) .side-scroll .tabs {
  width: var(--brand-size);
}

body:not(.sidebar-open) .side-scroll .tabs {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}

body:not(.sidebar-open) .tab,
body:not(.sidebar-open) .side-link,
body:not(.sidebar-open) .side-brand {
  justify-content: center;
  width: var(--brand-size);
  height: var(--brand-size);
  border-radius: 50%;
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}

body:not(.sidebar-open) .tab,
body:not(.sidebar-open) .side-link {
  justify-content: center;
  width: var(--brand-size);
  height: var(--brand-size);
  border-radius: 50%;
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}

body:not(.sidebar-open) .side-link .tab-icon,
body:not(.sidebar-open) .tab .tab-icon {
  width: 26px;
  height: 26px;
  font-size: 20px;
  margin: 0;
  line-height: 1;
}

.app-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin-left: var(--side-nav-width);
  transition: margin-left .35s ease;
}

.app-header {
  padding: 10px 24px 10px 8px;
  display: flex;
  align-items: center;
  gap: 16px;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.45);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.55));
  backdrop-filter: blur(var(--acrylic-blur)) saturate(130%);
  -webkit-backdrop-filter: blur(var(--acrylic-blur)) saturate(130%);
  position: sticky;
  top: 0;
  z-index: 15;
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.12);
}

.app-header h1 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: .4px;
  padding-left: 2ch;
}

.header-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

.header-actions .user-avatar-wrap {
  order: 100;
  margin-left: auto;
}

.header-link {
  background: transparent;
  border: none;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
}

.header-link .tab-icon {
  font-size: 16px;
}

.header-link .tab-label {
  font-size: 14px;
}

/* 导航栏图标悬停轻微“跳动” */
.header-link .tab-icon {
  transition: transform .15s ease;
}

.header-link:hover .tab-icon {
  transform: translateY(-2px) scale(1.08);
}

/* 透明按钮在悬停时也保持无边框与无阴影 */
.header-link:hover {
  background: transparent;
  border: none;
  box-shadow: none;
}

/* 已按需移除签到按钮角标样式 */

main {
  padding: 24px 24px;
  max-width: 920px;
  margin: 0 auto;
  width: 100%;
  flex: 1;
}

.view {
  display: none
}

.view.active {
  display: block
}

.card {
  background:
    radial-gradient(100% 120% at 0% 0%, rgba(14, 165, 233, 0.10), rgba(14, 165, 233, 0) 60%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0.18));
  border: 1px solid var(--glass-edge);
  border-radius: 16px;
  padding: 16px 16px;
  margin-bottom: 16px;
  backdrop-filter: blur(var(--acrylic-blur)) saturate(140%);
  -webkit-backdrop-filter: blur(var(--acrylic-blur)) saturate(140%);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12), inset 0 1px 0 var(--glass-highlight), inset 0 -1px 0 var(--glass-edge-dark);
}

.grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px
}

.grid label {
  display: flex;
  flex-direction: column;
  gap: 6px
}

.input,
input[type="text"],
input[type="number"],
input[type="date"],
select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--glass-edge);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0.3));
  color: var(--text);
  box-shadow: inset 0 1px 0 var(--glass-highlight);
  backdrop-filter: blur(12px) saturate(120%);
}

.checkbox {
  display: flex;
  align-items: center;
  gap: 8px
}

.toolbar {
  display: flex;
  gap: 8px;
  margin-bottom: 8px
}

/* === Dashboard Toolbar Style === */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.dashboard-card {
  background: linear-gradient(180deg, #f0f9ff 0%, #ffffff 80%);
  border: 1px solid #e0f2fe;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.08), 0 1px 2px rgba(14, 165, 233, 0.05);
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.dashboard-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 24px rgba(14, 165, 233, 0.12), 0 2px 4px rgba(14, 165, 233, 0.05);
  border-color: #bae6fd;
  z-index: 2;
}

.dashboard-header {
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(14, 165, 233, 0.1);
  margin-bottom: 4px;
}

.header-orange {
  color: #f97316;
}

.header-green {
  color: #10b981;
}

.header-purple {
  color: #8b5cf6;
}

.header-blue {
  color: #0ea5e9;
}

.tool-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tool-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #ffffff;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid rgba(14, 165, 233, 0.08);
  color: #334155;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  user-select: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.tool-item:hover {
  background: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.15);
  transform: translateX(2px);
  color: var(--primary-700);
}

.tool-icon-box {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

/* Tool Icon Themes */
.icon-orange {
  background: #fff7ed;
  color: #f97316;
}

.icon-green {
  background: #f0fdf4;
  color: #10b981;
}

.icon-purple {
  background: #f5f3ff;
  color: #8b5cf6;
}

.icon-blue {
  background: #f0f9ff;
  color: #0ea5e9;
}

.icon-red {
  background: #fef2f2;
  color: #ef4444;
}

.tool-item:hover .icon-orange {
  background: #ffedd5;
}

.tool-item:hover .icon-green {
  background: #dcfce7;
}

.tool-item:hover .icon-purple {
  background: #ede9fe;
}

.tool-item:hover .icon-blue {
  background: #e0f2fe;
}

.tool-item:hover .icon-red {
  background: #fee2e2;
}

.tool-arrow {
  margin-left: auto;
  opacity: 0.3;
  transition: opacity 0.2s, transform 0.2s;
}

.tool-item:hover .tool-arrow {
  opacity: 0.8;
  transform: translateX(2px);
}

/* Hide original class-toolbar if present */
.class-toolbar {
  display: none !important;
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--glass-edge);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.22));
  backdrop-filter: blur(14px) saturate(130%)
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px
}

th,
td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap
}

thead th {
  position: sticky;
  top: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.65));
  backdrop-filter: blur(8px);
}

#leaderboard th[data-sort] {
  cursor: pointer;
  user-select: none;
  position: relative;
  padding-right: 18px;
  transition: color .12s ease;
}

#leaderboard th[data-sort]::after {
  content: "";
  position: absolute;
  right: 8px;
  top: 50%;
  width: 0;
  height: 0;
  margin-top: -3px;
  border: 5px solid transparent;
  border-top-color: var(--muted);
  opacity: .35;
  transition: transform .12s ease, opacity .12s ease, border-color .12s ease;
}

#leaderboard th[data-sort][data-dir="none"]::after {
  border-top-color: var(--muted);
  border-bottom-color: transparent;
  opacity: .35;
}

#leaderboard th[data-sort][data-dir="asc"]::after {
  border-top-color: transparent;
  border-bottom-color: var(--primary);
  opacity: 1;
  transform: translateY(-1px);
}

#leaderboard th[data-sort][data-dir="desc"]::after {
  border-top-color: var(--primary);
  border-bottom-color: transparent;
  opacity: 1;
  transform: translateY(-2px);
}

#leaderboard th[data-sort].active-sort {
  color: var(--primary);
}

.app-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  text-align: center;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0.4));
  backdrop-filter: blur(var(--acrylic-blur));
}

@media (max-width: 1023px) {
  .app-header {
    padding: 10px 16px 10px 8px;
  }
}

@media (min-width: 1024px) {
  body.sidebar-open .side-nav {
    width: var(--side-nav-expanded);
  }
}

@media (max-width: 900px) {
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr))
  }
}

@media (max-width: 560px) {
  .grid {
    grid-template-columns: 1fr
  }

  .header-actions {
    width: auto
  }
}

.badge {
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 12px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(6px)
}

.badge.leader {
  color: #78350f;
  background: linear-gradient(135deg, #fff1b1, #fbbf24);
  border: none;
  box-shadow: 0 6px 16px rgba(251, 191, 36, 0.25)
}

.badge.rank-1 {
  background: linear-gradient(135deg, #fff7cc, #fbbf24);
  border: none;
  color: #7c2d12;
  box-shadow: 0 0 0 1px rgba(251, 191, 36, .45), 0 8px 22px rgba(251, 191, 36, .45)
}

.badge.rank-2 {
  background: linear-gradient(135deg, #eef2ff, #cbd5e1);
  border: none;
  color: #334155;
  box-shadow: 0 0 0 1px rgba(148, 163, 184, .45), 0 8px 22px rgba(148, 163, 184, .45)
}

.badge.rank-3 {
  background: linear-gradient(135deg, #fde68a, #f59e0b);
  border: none;
  color: #78350f;
  box-shadow: 0 0 0 1px rgba(245, 158, 11, .45), 0 8px 22px rgba(245, 158, 11, .45)
}

.glow {
  filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.18)) drop-shadow(0 0 14px rgba(255, 255, 255, 0.45))
}

.score-pos {
  color: #166534;
  font-weight: 700
}

.score-zero {
  color: #334155;
  font-weight: 600
}

.score-neg {
  color: #b91c1c;
  font-weight: 700
}

.top-rank td {
  font-weight: 600
}

.top-rank td:nth-child(2) {
  font-weight: 800
}

/* 排行榜列间距与对齐优化：名次居中，姓名左对齐；两列相隔约1字符 */
#leaderboard table th:nth-child(1),
#leaderboard table td:nth-child(1) {
  text-align: center;
  padding-right: 0.5ch;
}

#leaderboard table th:nth-child(2),
#leaderboard table td:nth-child(2) {
  text-align: left;
  padding-left: 0.5ch;
}

/* 第一名蓝色渐变“环绕”高亮（个人与小组榜） */
/* 前三名仅做描边呼吸灯效果（不加底色） */
#leaderboard-personal tr:first-child,
#leaderboard-group tr:first-child {
  position: relative;
}

/* 前三名：流动“光带”沿边框环绕（贪吃蛇效果） */
.top-rank {
  position: relative;
}

/* 贴合文本框的描边呼吸灯：紧贴内容盒子内沿 */

/* 呼吸动画（强弱与轻微缩放） */

/* 右下角发光圆形角标（不影响交互） */


/* 第一名行的圆角处理（两端单元格） */
#leaderboard-personal tr:first-child td:first-child,
#leaderboard-group tr:first-child td:first-child {
  border-top-left-radius: 10px;
  border-bottom-left-radius: 10px
}

#leaderboard-personal tr:first-child td:last-child,
#leaderboard-group tr:first-child td:last-child {
  border-top-right-radius: 10px;
  border-bottom-right-radius: 10px
}

.text-danger {
  color: #b91c1c
}

.text-muted {
  color: var(--muted)
}

.actions {
  display: flex;
  gap: 6px
}

.prize-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
  margin-top: 12px
}

.prize-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.12)
}

.prize-thumb {
  position: relative;
  aspect-ratio: 4/3;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.12), rgba(99, 102, 241, 0.12));
  display: flex;
  align-items: center;
  justify-content: center
}

.prize-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block
}

.prize-fallback {
  font-size: 42px;
  line-height: 1
}

.prize-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px
}

.prize-name {
  font-weight: 700;
  font-size: 15px;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap
}

.prize-cost {
  color: var(--primary-700);
  font-weight: 800;
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 6px
}

.prize-currency {
  font-size: 11px;
  background: rgba(14, 165, 233, 0.08);
  color: var(--primary-700);
  padding: 3px 6px;
  border-radius: 999px;
  letter-spacing: .5px
}

.empty-prize-tip {
  border: 1px dashed var(--border);
  border-radius: 12px;
  padding: 12px;
  color: var(--muted);
  text-align: center;
  background: rgba(255, 255, 255, 0.4)
}

.prize-add {
  border: 1px dashed var(--primary);
  background: rgba(14, 165, 233, 0.06);
  color: var(--primary-700);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 8px
}

.prize-add .plus {
  font-size: 28px;
  line-height: 1
}

.prize-card.editable {
  cursor: pointer
}

.prize-editor-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  padding: 12px
}

.prize-editor-backdrop.show {
  display: flex
}

.prize-editor-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 16px 42px rgba(15, 23, 42, 0.18);
  padding: 18px;
  min-width: 300px;
  max-width: 360px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border: 1px solid rgba(226, 232, 240, 0.9)
}

.prize-editor-card h3 {
  margin: 0;
  font-size: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text)
}

.prize-editor-card label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 600;
  color: var(--text)
}

.prize-editor-card input {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 10px
}

.prize-editor-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center
}

.retro-printer {
  background: #0f172a;
  border-radius: 18px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 0 16px rgba(0, 0, 0, 0.35), 0 12px 28px rgba(15, 23, 42, 0.25)
}

.retro-printer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #cbd5e1;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 10px
}

.retro-paper {
  background: linear-gradient(#f8fafc, #e2e8f0);
  border-radius: 14px;
  padding: 14px;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.05);
  position: relative
}

.retro-perf {
  position: absolute;
  top: 10px;
  left: 14px;
  right: 14px;
  height: 6px;
  border-top: 1px dashed rgba(15, 23, 42, 0.22)
}

.retro-ticket-list {
  max-height: 280px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 18px
}

.retro-ticket {
  background: #fff;
  border-radius: 12px;
  padding: 10px 12px;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.12);
  font-family: 'JetBrains Mono', 'Menlo', monospace;
  color: #0f172a;
  position: relative
}

.retro-ticket time {
  display: block;
  font-size: 12px;
  color: #94a3b8;
  margin-bottom: 4px
}

.retro-ticket strong {
  display: block;
  font-size: 14px;
  color: #0f172a
}

.retro-ticket p {
  margin: 6px 0 0 0;
  font-size: 13px;
  color: #1f2937
}

.retro-ticket .ticket-delete {
  position: absolute;
  right: 10px;
  top: 10px;
  border: none;
  background: transparent;
  color: #ef4444;
  cursor: pointer;
  font-size: 14px
}

.retro-ticket-list::-webkit-scrollbar {
  width: 6px
}

.retro-ticket-list::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.08);
  border-radius: 999px
}

.retro-ticket-list::-webkit-scrollbar-thumb {
  background: #94a3b8;
  border-radius: 999px
}

.redeem-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
  align-items: start
}

/* 排行榜并列布局：桌面两列，窄屏一列 */
.lb-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px
}

@media (max-width: 900px) {
  .lb-grid {
    grid-template-columns: 1fr
  }
}

#leaderboard .table-wrap table tbody tr {
  position: relative;
  z-index: 0;
}

/* 排行榜悬停高亮（增强可见度） */
#leaderboard .table-wrap table tbody tr:hover,
#leaderboard .table-wrap table tbody tr:hover td {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.82)) !important;
}

#leaderboard .table-wrap table tbody tr:hover {
  box-shadow: inset 3px 0 0 0 var(--primary), inset 0 -1px 0 rgba(14, 165, 233, 0.25);
  transition: background .12s ease, box-shadow .12s ease;
  z-index: 10;
}

/* 积分卡片模式 */
.points-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px
}

@media (max-width: 900px) {
  .points-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr))
  }
}

@media (max-width: 560px) {
  .points-grid {
    grid-template-columns: 1fr
  }
}

.point-card {
  position: relative;
}

.point-card .card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 8px 0
}

.group-all-btn {
  appearance: none;
  border: 1px solid var(--glass-edge);
  background: linear-gradient(135deg, #16a34a, #22c55e);
  color: #fff;
  border-radius: 999px;
  padding: 6px 10px;
  cursor: pointer;
  font-weight: 600;
  box-shadow: 0 6px 16px rgba(34, 197, 94, .28);
}

.group-all-btn.done {
  background: linear-gradient(135deg, #22c55e, #4ade80);
}

.member-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--glass-edge);
  background: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  margin: 4px;
  min-width: 72px;
  box-shadow: inset 0 1px 0 var(--glass-highlight);
}

.member-btn.leader {
  font-weight: 700;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(14, 165, 233, .15)
}

.point-card.pulse {
  animation: pulseGlow .6s ease
}

@keyframes pulseGlow {
  0% {
    box-shadow: 0 0 0 rgba(34, 197, 94, 0)
  }

  50% {
    box-shadow: 0 0 0 6px rgba(34, 197, 94, .35)
  }

  100% {
    box-shadow: 0 0 0 rgba(34, 197, 94, 0)
  }
}

/* 类型快捷面板 */
#type-quick-panel {
  position: fixed;
  display: none;
  z-index: 10000;
  background: linear-gradient(180deg, rgba(255, 255, 255, .95), rgba(255, 255, 255, .8));
  border: 1px solid var(--glass-edge);
  border-radius: 12px;
  padding: 8px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

#type-quick-panel .type-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px
}

#type-quick-panel button {
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--glass-edge);
  cursor: pointer;
  background: rgba(255, 255, 255, 0.8)
}

#type-quick-panel button.positive {
  border-color: #86efac
}

#type-quick-panel button.negative {
  border-color: #fecaca
}

/* 加分浮动动效 */
.score-burst {
  position: fixed;
  z-index: 10001;
  pointer-events: none;
  color: #dc2626;
  font-weight: 800;
  font-size: 16px;
  transform: translate(-50%, -20px) scale(1);
  opacity: 0;
  animation: scoreBurst 1.1s ease forwards;
  text-shadow: 0 2px 6px rgba(220, 38, 38, 0.35);
}

@keyframes scoreBurst {
  0% {
    opacity: .0;
    transform: translate(-50%, 0) scale(.8)
  }

  20% {
    opacity: 1;
    transform: translate(-50%, -6px) scale(1.05)
  }

  100% {
    opacity: 0;
    transform: translate(-50%, -28px) scale(1.3)
  }
}

.side-footer {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.35);
}

.side-footer .side-link {
  background: rgba(14, 165, 233, 0.15);
}

.side-footer .side-link:hover {
  box-shadow: 0 10px 26px rgba(14, 165, 233, 0.22);
}

.side-footer::before {
  content: "";
  display: block;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.65), transparent);
  margin-bottom: 10px;
}

/* 移除“悬浮侧边栏”覆盖，恢复为布局内侧边栏 */

/* 滑动开关样式（全站复用，原位于 index.html） */
.toggle {
  position: relative;
  width: 44px;
  height: 24px;
  display: inline-flex;
  align-items: center;
}

.toggle-input {
  appearance: none;
  -webkit-appearance: none;
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.toggle-track {
  width: 100%;
  height: 100%;
  background: #d1d5db;
  border-radius: 999px;
  position: relative;
  transition: background .2s ease;
}

.toggle-track::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  top: 2px;
  left: 2px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .2);
  transition: transform .2s ease;
}

.toggle-input:checked+.toggle-track {
  background: #2f80ff;
}

.toggle-input:checked+.toggle-track::after {
  transform: translateX(20px);
}

.toggle-input:disabled+.toggle-track {
  background: #e5e7eb;
  opacity: .6;
  cursor: not-allowed;
}

.toggle-input:disabled+.toggle-track::after {
  box-shadow: none;
}

/* 分段滑动按钮样式（全站复用，原位于 index.html 内联） */
.seg-toggle {
  position: relative;
  display: inline-flex;
  gap: 0;
  border-radius: 999px;
  background: #eef2f7;
  padding: 4px;
  height: var(--seg-h, 36px);
}

.seg-item {
  position: relative;
  z-index: 1;
  border: none;
  background: transparent;
  padding: 0 16px;
  min-width: 110px;
  border-radius: 999px;
  color: #3b4a5a;
  font-weight: 600;
  cursor: pointer;
}

.seg-pill {
  position: absolute;
  top: 4px;
  left: 4px;
  width: calc(50% - 8px);
  height: calc(100% - 8px);
  border-radius: 999px;
  background: #2f80ff;
  box-shadow: 0 6px 16px rgba(47, 128, 255, .35);
  transition: transform .22s ease;
}

.seg-toggle[data-pos="other"] .seg-pill {
  transform: translateX(100%);
}

.seg-toggle .seg-item.active {
  color: #fff;
}

/* 移动端默认展开导航（不依赖 JS，不改结构） */
@media (max-width: 768px) {
  .app-header {
    flex-wrap: wrap;
    /* 允许换行 */
    row-gap: 8px;
  }

  .app-header h1 {
    flex: 1 0 100%;
    /* 标题独占一行，避免挤压按钮 */
  }

  .header-actions {
    display: flex !important;
    /* 确保不会被其他规则隐藏 */
    flex: 1 0 100%;
    /* 占满一行 */
    flex-wrap: wrap;
    /* 按需换行展示所有按钮 */
    gap: 6px;
  }
}

/* 悬浮可拖拽计时器 */
.floating-timer {
  position: fixed;
  right: 16px;
  bottom: 16px;
  width: 280px;
  border-radius: 14px;
  z-index: 10050;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--glass-edge);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.25);
  backdrop-filter: blur(12px) saturate(130%);
}

.floating-timer .ft-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 8px;
  cursor: move;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0.35));
  border-bottom: 1px solid rgba(0, 0, 0, .06);
  border-radius: 14px 14px 0 0;
}

.floating-timer .ft-title {
  font-weight: 700;
  font-size: 14px;
  color: var(--primary-700);
  user-select: none;
}

.floating-timer .ft-actions {
  display: flex;
  gap: 6px;
}

.floating-timer .ft-body {
  padding: 10px 10px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.floating-timer .ft-time {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: 2px;
  text-align: center;
  margin: 6px 0 10px;
}

.floating-timer .ft-controls {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.floating-timer .ft-controls-row {
  display: flex;
  gap: 6px;
  justify-content: center;
}

.floating-timer .ft-btn {
  padding: 6px 10px;
  border-radius: 10px;
}

.floating-timer .seg-toggle {
  --seg-h: 30px;
}

/* 悬浮计时器图标按钮尺寸 */
.floating-timer .ft-icon {
  width: 18px;
  height: 18px;
  display: block;
}

/* Calendar selected date highlight */
.selected-date {
  box-shadow: inset 0 0 0 2px #6366f1 !important;
  background-color: transparent !important;
}

/* Receipt Printer Styles */
.receipt-printer {
  position: fixed;
  top: 80px;
  right: 24px;
  width: 300px;
  z-index: 900;
  perspective: 1000px;
  filter: drop-shadow(0 20px 30px rgba(0, 0, 0, 0.3));
}

.printer-body {
  background: #1a1a1a;
  border-radius: 12px 12px 4px 4px;
  padding: 16px;
  position: relative;
  z-index: 20;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
  border-bottom: 6px solid #000;
}

.printer-slot {
  height: 8px;
  background: #000;
  border-radius: 4px;
  margin-bottom: 8px;
  box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.1);
}

.printer-led {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #333;
  position: absolute;
  top: 16px;
  right: 16px;
}

.printer-led.active {
  background: #22c55e;
  box-shadow: 0 0 8px #22c55e;
}

.printer-power-btn {
  position: absolute;
  top: 12px;
  left: 16px;
  width: 24px;
  height: 24px;
  background: #333;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.5), 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: all 0.2s;
}

.printer-power-btn:hover {
  background: #444;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.5), 0 0 5px rgba(255, 255, 255, 0.2);
}

.printer-power-btn:active {
  background: #222;
  transform: translateY(1px);
}

.power-icon {
  color: #666;
  font-size: 14px;
  line-height: 1;
}

.printer-power-btn:hover .power-icon {
  color: #ef4444;
  text-shadow: 0 0 5px rgba(239, 68, 68, 0.5);
}

.receipt-paper {
  background: #fdfdfd;
  width: 92%;
  margin: -4px auto 0;
  padding: 20px 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  font-family: 'Courier New', Courier, monospace;
  color: #333;
  position: relative;
  z-index: 10;
  transform-origin: top center;
  animation: printOut 0.6s ease-out backwards;
  min-height: 200px;
  max-height: 70vh;
  overflow-y: auto;
  border-bottom: 1px dashed #ccc;
}

.receipt-paper::-webkit-scrollbar {
  width: 4px;
}

.receipt-paper::-webkit-scrollbar-thumb {
  background: #ddd;
  border-radius: 4px;
}

.receipt-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid #333;
}

.receipt-divider {
  border-top: 1px dashed #aaa;
  margin: 10px 0;
}

.receipt-item {
  margin-bottom: 12px;
  font-size: 13px;
  line-height: 1.4;
  animation: typeIn 0.3s ease-out forwards;
  opacity: 0;
}

.receipt-item-header {
  display: flex;
  justify-content: space-between;
  font-weight: bold;
  margin-bottom: 2px;
}

.receipt-item-detail {
  font-size: 12px;
  color: #666;
}

.receipt-tear-line {
  position: absolute;
  bottom: -6px;
  left: 0;
  right: 0;
  height: 12px;
  background: radial-gradient(circle, transparent 50%, #fdfdfd 50%) 0 -6px;
  background-size: 12px 12px;
  transform: rotate(180deg);
}

@keyframes printOut {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes typeIn {
  from {
    transform: translateY(-10px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Event Editor Modal Styles */
.clean-input {
  border: none;
  background: transparent;
  font-size: 14px;
  color: #1f2329;
  font-family: inherit;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background 0.2s;
  cursor: pointer;
}

.clean-input:hover {
  background: #f2f3f5;
}

.clean-input:focus {
  background: #fff;
  box-shadow: 0 0 0 2px #3370ff;
  outline: none;
}

.editor-row .icon {
  font-style: normal;
  font-size: 16px;
  line-height: 1;
}

#event-editor-modal .modal-content {
  background: #fff;
  border: 1px solid #dee0e3;
}

/* 小票机模式下的布局调整 */
body.receipt-mode .app-main {
  padding-right: 320px;
  transition: padding-right 0.3s ease;
}

@media (max-width: 1100px) {
  body.receipt-mode .app-main {
    padding-right: 0;
  }

  .receipt-printer {
    display: none !important;
    /* 小屏隐藏 */
  }
}

/* Theme Selection Cards */
.theme-card {
  border: 2px solid transparent;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  overflow: hidden;
  position: relative;
  background: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.theme-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.theme-card.active {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.2);
}

.theme-preview {
  height: 80px;
  width: 100%;
  position: relative;
  background: var(--theme-bg-preview);
}

.theme-preview-primary {
  position: absolute;
  bottom: 10px;
  right: 10px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--theme-primary-preview);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.theme-name {
  padding: 10px;
  font-weight: 600;
  font-size: 14px;
  text-align: center;
  color: #334155;
}

.theme-card.active .theme-name {
  color: var(--primary);
}

.theme-check {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 20px;
  height: 20px;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.theme-card.active .theme-check {
  opacity: 1;
  transform: scale(1);
}

/* Member Card Styles */
.member-card {
  background: rgba(255, 255, 255, 0.6);
  border-radius: 12px;
  padding: 12px;
  border: 1px solid var(--glass-edge);
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 12px;
  backdrop-filter: blur(10px);
}

.member-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  border-color: var(--primary);
  background: rgba(255, 255, 255, 0.8);
}

.member-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0ea5e9, #6366f1);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 18px;
  box-shadow: 0 4px 10px rgba(14, 165, 233, 0.3);
}

.member-info {
  flex: 1;
  min-width: 0;
}

.member-name {
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.member-meta {
  font-size: 12px;
  color: #64748b;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.member-points {
  font-size: 12px;
  display: flex;
  gap: 10px;
}

.points-avail {
  color: #059669;
  font-weight: 600;
}

.points-total {
  color: #d97706;
}