/* ══════════════════════════════════════════════════════════
   积分中心模块 points_center.css  v1.0 (20260709)
   零侵入追加：与 mt_credits_ui.js 协同，不覆盖任何已有样式
   深色主题；文字统一使用非白色亮色 #E6E8F0 / #C8CEDD / #9AA4BF
   ══════════════════════════════════════════════════════════ */

/* ── 顶部导航栏余额胶囊 ── */
#pcNavBalance {
  position: fixed;
  top: 10px;
  right: 150px; /* 避让已有 mtCreditsBadge（right:12px） */
  z-index: 9998;
  display: flex;
  align-items: center;
  gap: 7px;
  background: linear-gradient(135deg, #12151f, #1c2233);
  border: 1px solid #2d3550;
  border-radius: 18px;
  padding: 5px 13px;
  font-size: 13px;
  color: #E6E8F0;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .35);
  transition: border-color .2s, box-shadow .2s;
  font-family: inherit;
  user-select: none;
}
#pcNavBalance:hover { border-color: #4a5580; box-shadow: 0 4px 14px rgba(0, 0, 0, .5); }
#pcNavBalance .pc-coin {
  width: 15px; height: 15px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffd766, #d9930f);
  box-shadow: 0 0 5px rgba(217, 147, 15, .55);
  flex-shrink: 0;
}
#pcNavBalance .pc-num { font-weight: 600; color: #F5C542; font-variant-numeric: tabular-nums; }
#pcNavBalance .pc-tier-tag {
  font-size: 10px; color: #9AA4BF; background: #232941;
  border-radius: 8px; padding: 1px 7px; margin-left: 2px;
}
#pcNavBalance.pc-low .pc-num { color: #F59E0B; }
#pcNavBalance.pc-empty .pc-num { color: #EF4444; }
@media (max-width: 720px) {
  #pcNavBalance { right: auto; left: 10px; top: 8px; padding: 4px 10px; font-size: 12px; }
  #pcNavBalance .pc-tier-tag { display: none; }
}

/* ── 积分中心抽屉面板 ── */
#pcDrawerMask {
  position: fixed; inset: 0; z-index: 10500;
  background: rgba(4, 6, 12, .62);
  backdrop-filter: blur(2px);
  display: flex; justify-content: flex-end;
  animation: pcFadeIn .18s ease;
}
@keyframes pcFadeIn { from { opacity: 0; } to { opacity: 1; } }
#pcDrawer {
  width: min(560px, 96vw);
  height: 100%;
  background: #0e1118;
  border-left: 1px solid #262d45;
  color: #E6E8F0;
  display: flex; flex-direction: column;
  animation: pcSlideIn .22s ease;
  font-size: 14px;
}
@keyframes pcSlideIn { from { transform: translateX(40px); opacity: .3; } to { transform: none; opacity: 1; } }

.pc-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px 12px;
  border-bottom: 1px solid #1e2438;
}
.pc-head h2 { margin: 0; font-size: 17px; font-weight: 600; color: #E6E8F0; }
.pc-close {
  cursor: pointer; color: #7C86A3; font-size: 22px; line-height: 1;
  padding: 2px 6px; border-radius: 6px; transition: color .15s, background .15s;
}
.pc-close:hover { color: #E6E8F0; background: #1c2233; }

/* Tab 切换 */
.pc-tabs {
  display: flex; gap: 2px; padding: 0 20px;
  border-bottom: 1px solid #1e2438;
}
.pc-tab {
  padding: 11px 14px; font-size: 13px; color: #7C86A3; cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: color .15s, border-color .15s;
}
.pc-tab:hover { color: #C8CEDD; }
.pc-tab.active { color: #5B8DEF; border-bottom-color: #5B8DEF; font-weight: 500; }
.pc-body { flex: 1; overflow-y: auto; padding: 16px 20px 28px; }
.pc-body::-webkit-scrollbar { width: 8px; }
.pc-body::-webkit-scrollbar-thumb { background: #262d45; border-radius: 4px; }

/* ── 概览卡片 ── */
.pc-balance-hero {
  background: linear-gradient(135deg, #151a2a, #1a2138);
  border: 1px solid #2d3550;
  border-radius: 14px;
  padding: 18px 20px;
  margin-bottom: 14px;
}
.pc-balance-hero .pc-bh-label { font-size: 12px; color: #9AA4BF; margin-bottom: 6px; }
.pc-balance-hero .pc-bh-value {
  font-size: 34px; font-weight: 700; color: #F5C542;
  font-variant-numeric: tabular-nums; line-height: 1.15;
}
.pc-balance-hero .pc-bh-sub { font-size: 12px; color: #7C86A3; margin-top: 6px; }
.pc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.pc-cell {
  background: #141827; border: 1px solid #232941; border-radius: 10px;
  padding: 12px 14px;
}
.pc-cell .pc-c-label { font-size: 11px; color: #7C86A3; margin-bottom: 5px; }
.pc-cell .pc-c-value { font-size: 19px; font-weight: 600; color: #E6E8F0; font-variant-numeric: tabular-nums; }
.pc-cell .pc-c-sub { font-size: 11px; color: #9AA4BF; margin-top: 3px; }
.pc-cell.pc-daily .pc-c-value { color: #4ADE80; }
.pc-cell.pc-monthly .pc-c-value { color: #5B8DEF; }
.pc-cell.pc-addon .pc-c-value { color: #F59E0B; }
.pc-cell.pc-free .pc-c-value { color: #A78BFA; }

.pc-bar { height: 6px; background: #1a2035; border-radius: 3px; overflow: hidden; margin-top: 8px; }
.pc-bar > i { display: block; height: 100%; background: linear-gradient(90deg, #5B8DEF, #4ADE80); transition: width .3s; }

/* ── 当前套餐卡 ── */
.pc-plan-card {
  background: #141827; border: 1px solid #2d3550; border-radius: 12px;
  padding: 15px 17px; margin-bottom: 14px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.pc-plan-card .pc-plan-name { font-size: 15px; font-weight: 600; color: #E6E8F0; }
.pc-plan-card .pc-plan-desc { font-size: 12px; color: #9AA4BF; margin-top: 4px; line-height: 1.5; }
.pc-badge {
  display: inline-block; font-size: 10px; padding: 2px 8px; border-radius: 9px;
  margin-left: 8px; vertical-align: middle; font-weight: 500;
}
.pc-badge.tier-free { background: #232941; color: #9AA4BF; }
.pc-badge.tier-pro { background: rgba(91, 141, 239, .18); color: #5B8DEF; }
.pc-badge.tier-team { background: rgba(167, 139, 250, .18); color: #A78BFA; }
.pc-upgrade-btn {
  flex-shrink: 0;
  background: linear-gradient(135deg, #4f7fe0, #5B8DEF);
  color: #F0F3FA; border: none; border-radius: 9px;
  padding: 9px 18px; font-size: 13px; font-weight: 500; cursor: pointer;
  transition: filter .15s, transform .1s;
}
.pc-upgrade-btn:hover { filter: brightness(1.12); }
.pc-upgrade-btn:active { transform: scale(.97); }

/* ── 消费记录表格 ── */
.pc-table-wrap { border: 1px solid #232941; border-radius: 10px; overflow: hidden; }
table.pc-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
table.pc-table thead th {
  background: #161b2c; color: #9AA4BF; font-weight: 500; text-align: left;
  padding: 9px 12px; font-size: 11.5px; border-bottom: 1px solid #232941;
  white-space: nowrap;
}
table.pc-table tbody td {
  padding: 9px 12px; color: #C8CEDD; border-bottom: 1px solid #1a2035;
  font-variant-numeric: tabular-nums;
}
table.pc-table tbody tr:last-child td { border-bottom: none; }
table.pc-table tbody tr:hover td { background: #141827; }
.pc-cost-neg { color: #F87171; font-weight: 500; }
.pc-td-time { color: #7C86A3; white-space: nowrap; }
.pc-td-tool { color: #E6E8F0; }
.pc-src-tag {
  display: inline-block; font-size: 10px; padding: 1px 6px; border-radius: 6px;
  background: #232941; color: #9AA4BF; margin-left: 5px;
}

/* 汇总条 */
.pc-usage-summary {
  display: flex; gap: 16px; flex-wrap: wrap;
  background: #141827; border: 1px solid #232941; border-radius: 10px;
  padding: 11px 15px; margin-bottom: 12px; font-size: 12px; color: #9AA4BF;
}
.pc-usage-summary b { color: #E6E8F0; font-weight: 600; }

/* 分页 */
.pc-pager { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 13px; }
.pc-pager button {
  background: #161b2c; border: 1px solid #2d3550; color: #C8CEDD;
  border-radius: 8px; padding: 6px 15px; font-size: 12px; cursor: pointer;
  transition: border-color .15s;
}
.pc-pager button:hover:not(:disabled) { border-color: #4a5580; }
.pc-pager button:disabled { opacity: .38; cursor: not-allowed; }
.pc-pager .pc-page-info { font-size: 12px; color: #7C86A3; }

/* ── 套餐列表 ── */
.pc-tier-card {
  border: 1px solid #2d3550; border-radius: 12px; padding: 15px 17px;
  margin-bottom: 10px; background: #12151f; transition: border-color .15s, background .15s;
}
.pc-tier-card:hover { border-color: #4a5580; }
.pc-tier-card.current { border-color: #34a06a; background: rgba(52, 160, 106, .07); }
.pc-tier-card.recommended { border-color: #5B8DEF; background: rgba(91, 141, 239, .07); }
.pc-tier-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.pc-tier-name { font-size: 15px; font-weight: 600; color: #E6E8F0; }
.pc-tier-price { text-align: right; font-size: 13px; color: #C8CEDD; white-space: nowrap; }
.pc-tier-price .pc-annual { display: block; font-size: 11px; color: #7C86A3; margin-top: 2px; }
.pc-tier-credits { font-size: 12.5px; color: #4ADE80; margin: 7px 0 5px; }
.pc-tier-desc { font-size: 12px; color: #9AA4BF; line-height: 1.55; }
.pc-tier-feats { margin: 8px 0 0; padding: 0; list-style: none; font-size: 11.5px; color: #8B94AE; line-height: 1.7; }
.pc-tier-feats li::before { content: "✓ "; color: #4ADE80; }
.pc-tier-actions { margin-top: 11px; }
.pc-tier-btn {
  width: 100%; background: #1c2233; border: 1px solid #2d3550; color: #C8CEDD;
  border-radius: 9px; padding: 9px 0; font-size: 13px; cursor: pointer;
  transition: all .15s; font-weight: 500;
}
.pc-tier-btn:hover { border-color: #5B8DEF; color: #E6E8F0; }
.pc-tier-btn.primary { background: linear-gradient(135deg, #4f7fe0, #5B8DEF); border: none; color: #F0F3FA; }
.pc-tier-btn.primary:hover { filter: brightness(1.12); }
.pc-tier-btn:disabled { opacity: .45; cursor: default; }
.pc-badge-cur { background: rgba(52, 160, 106, .2); color: #4ADE80; }
.pc-badge-hot { background: rgba(91, 141, 239, .2); color: #5B8DEF; }

/* ── 对话消耗提示 toast/气泡 ── */
.pc-cost-toast {
  position: fixed; bottom: 96px; right: 18px; z-index: 10800;
  background: linear-gradient(135deg, #151a2a, #1c2233);
  border: 1px solid #2d3550; border-radius: 12px;
  padding: 10px 16px; font-size: 13px; color: #E6E8F0;
  box-shadow: 0 6px 22px rgba(0, 0, 0, .5);
  display: flex; align-items: center; gap: 9px;
  animation: pcToastIn .25s ease;
  max-width: 320px;
}
@keyframes pcToastIn { from { transform: translateY(14px); opacity: 0; } to { transform: none; opacity: 1; } }
.pc-cost-toast.pc-out { animation: pcToastOut .3s ease forwards; }
@keyframes pcToastOut { to { transform: translateY(10px); opacity: 0; } }
.pc-cost-toast .pc-ct-cost { color: #F5C542; font-weight: 600; font-variant-numeric: tabular-nums; }
.pc-cost-toast .pc-ct-bal { color: #9AA4BF; font-size: 11.5px; }

/* 消息内嵌消耗徽标（追加在AI回复气泡尾部） */
.pc-msg-cost {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; color: #8B94AE;
  background: #161b2c; border: 1px solid #232941;
  border-radius: 9px; padding: 2px 9px; margin-top: 6px;
}
.pc-msg-cost .pc-mc-val { color: #F5C542; font-weight: 600; }

/* ── 空态 / 加载 ── */
.pc-empty { text-align: center; color: #7C86A3; padding: 34px 0; font-size: 13px; }
.pc-loading { text-align: center; color: #7C86A3; padding: 26px 0; font-size: 13px; }
.pc-loading::after { content: "…"; animation: pcDots 1.2s steps(3) infinite; }
@keyframes pcDots { 0% { content: ""; } 33% { content: "."; } 66% { content: ".."; } 100% { content: "..."; } }
.pc-error { text-align: center; color: #F87171; padding: 20px 0; font-size: 12.5px; }
.pc-retry-btn {
  display: block; margin: 8px auto 0; background: #1c2233; border: 1px solid #2d3550;
  color: #C8CEDD; border-radius: 8px; padding: 6px 16px; font-size: 12px; cursor: pointer;
}
.pc-retry-btn:hover { border-color: #4a5580; }
