/* ==========================================
   管理页 — 任务管理
   ========================================== */
#bag-view {
  background: #F4F6FB;
}

/* ---- 顶部栏 ---- */
.bag-topbar {
  background: linear-gradient(135deg, #FF6B9D 0%, #FF8FAB 100%);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(255,107,157,0.3);
}

.bag-topbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}

.bag-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  flex-shrink: 0;
}

.bag-child-name {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}

.bag-child-sub {
  font-size: 12px;
  color: rgba(255,255,255,0.8);
  margin-top: 1px;
}

.bag-random-btn {
  background: rgba(255,255,255,0.22);
  backdrop-filter: blur(8px);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 20px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.15s;
}
.bag-random-btn:active { background: rgba(255,255,255,0.35); }

/* ---- 目标条 ---- */
.bag-goal-bar {
  margin: 12px 12px 0;
  background: #fff;
  border-radius: 16px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.07);
  cursor: pointer;
  flex-shrink: 0;
}

.bag-goal-empty {
  background: linear-gradient(135deg, #FF9842, #FF6B00);
  color: #fff;
  box-shadow: 0 4px 14px rgba(255,107,0,0.35);
}

.bgb-info {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.bgb-icon { font-size: 20px; }
.bgb-name { font-size: 14px; font-weight: 700; color: #333; }

.bgb-right {
  flex: 1;
  min-width: 0;
}
.bgb-val { font-size: 12px; color: #FF6B9D; font-weight: 600; display: block; margin-bottom: 4px; }
.bgb-progress { height: 6px; background: #F0F0F0; border-radius: 3px; overflow: hidden; }
.bgb-fill { height: 100%; background: linear-gradient(90deg, #FF6B9D, #FF9842); border-radius: 3px; transition: width 0.4s; }

/* ---- 筛选 Tab ---- */
.bag-filter-row {
  display: flex;
  gap: 8px;
  padding: 12px 12px 0;
  flex-shrink: 0;
}

.bfr-tab {
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  background: #fff;
  color: #999;
  cursor: pointer;
  box-shadow: 0 1px 6px rgba(0,0,0,0.08);
  transition: all 0.15s;
  white-space: nowrap;
}
.bfr-tab.active {
  background: #FF6B9D;
  color: #fff;
  box-shadow: 0 2px 10px rgba(255,107,157,0.4);
}

/* ---- 任务列表 ---- */
.bag-task-list {
  flex: 1;
  padding: 10px 12px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bag-empty-tasks {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
}

.bag-empty-tip {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #FF6B9D, #FF8FAB);
}

/* ---- 任务卡片 ---- */
.bag-task-card {
  background: #fff;
  border-radius: 16px;
  padding: 14px 14px 14px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.07);
  cursor: pointer;
  transition: transform 0.12s;
  position: relative;
  border-left: 5px solid #E0E0E0;
  flex-shrink: 0;
}
.bag-task-card:active { transform: scale(0.98); }
.bag-task-card.bag-task-done { opacity: 0.55; }

/* 左侧彩色边框 — 稀有度 */
.rarity-left-N     { border-left-color: #8899AA; }
.rarity-left-SR    { border-left-color: #9B59B6; }
.rarity-left-SSR   { border-left-color: #F39C12; }
.rarity-left-Legend{ border-left-color: #FF6B6B; }

.btc-icon { font-size: 36px; flex-shrink: 0; line-height: 1; }

.btc-body {
  flex: 1;
  min-width: 0;
}

.btc-name {
  font-size: 15px;
  font-weight: 700;
  color: #333;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 5px;
}

.btc-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.btc-rarity {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
  letter-spacing: 0.5px;
}
.rarity-tag-N     { background: #F0F0F0; color: #8899AA; }
.rarity-tag-SR    { background: #F4E8FC; color: #9B59B6; }
.rarity-tag-SSR   { background: #FEF4E0; color: #F39C12; }
.rarity-tag-Legend{ background: #FEE8E8; color: #FF6B6B; }

.btc-stars { font-size: 11px; }
.btc-freq { font-size: 11px; color: #AAA; }
.btc-pool { font-size: 12px; }

.btc-edit-btn {
  font-size: 18px;
  padding: 8px;
  cursor: pointer;
  flex-shrink: 0;
  opacity: 0.5;
  transition: opacity 0.15s;
  border-radius: 8px;
}
.btc-edit-btn:active { opacity: 1; background: #F5F5F5; }

/* ---- 添加任务按钮 ---- */
.bag-add-task-btn {
  margin: 12px 12px 0;
  border: 2.5px dashed #FF6B9D;
  border-radius: 16px;
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #FF6B9D;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  background: rgba(255,107,157,0.05);
  transition: all 0.15s;
  flex-shrink: 0;
}
.bag-add-task-btn:active { background: rgba(255,107,157,0.12); }

/* ---- 弹窗内专用组件 ---- */
.rarity-selector {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rarity-opt {
  padding: 10px 14px;
  border-radius: 12px;
  border: 2px solid #E0E0E0;
  cursor: pointer;
  transition: all 0.15s;
  background: #FAFAFA;
}
.rarity-opt.selected { background: #FFF; }
.rarity-opt:active { transform: scale(0.98); }

.stars-selector {
  display: flex;
  gap: 8px;
  justify-content: space-between;
}

.star-opt {
  flex: 1;
  padding: 8px 4px;
  border-radius: 12px;
  border: 2px solid #E0E0E0;
  cursor: pointer;
  text-align: center;
  font-size: 12px;
  background: #FAFAFA;
  transition: all 0.15s;
}
.star-opt.selected {
  border-color: #FF6B9D;
  background: #FFF0F5;
}

.freq-selector {
  display: flex;
  gap: 10px;
}

.freq-opt {
  flex: 1;
  padding: 12px 8px;
  border-radius: 16px;
  border: 2px solid #E0E0E0;
  cursor: pointer;
  text-align: center;
  background: #FAFAFA;
  transition: all 0.15s;
}
.freq-opt.selected {
  border-color: #FF6B9D;
  background: #FFF0F5;
}
.freq-opt:active { transform: scale(0.97); }

/* 旧版兼容（已不用，可保留防报错） */
.bag-header {}
.bag-grid {}
.task-grid-card {}
.bag-filter-tabs {}
.bag-filter-tab {}
.random-challenge-btn {}
