/* ===========================================================
   Account Center layout
   =========================================================== */
.account-layout { display: flex; gap: 24px; max-width: var(--page-max); margin: 24px auto; padding: 0 var(--content-px); align-items: flex-start; }
.account-sidebar { width: 220px; flex: none; background: var(--c-panel); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: 12px; position: sticky; top: 76px; }
.account-sidebar .user-card { display: flex; align-items: center; gap: 12px; padding: 12px; border-bottom: 1px solid var(--color-border); margin-bottom: 10px; }
.account-sidebar .user-card .avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; background: var(--color-surface-2); }
.account-sidebar .user-card .u-name { font-size: var(--fs-sm); font-weight: var(--fw-semibold); }
.account-sidebar .user-card .u-sub { font-size: var(--fs-xs); color: var(--color-text-muted); }
.account-nav { display: flex; flex-direction: column; }
.account-nav a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--radius-md); font-size: var(--fs-sm); color: var(--color-text-strong); }
.account-nav a:hover { background: var(--color-surface-2); }
.account-nav a.is-active { background: var(--color-primary-bg); color: var(--color-primary); font-weight: var(--fw-medium); }
.account-nav .grp { font-size: var(--fs-xs); color: var(--color-text-light); padding: 14px 12px 6px; }
.account-content { flex: 1; min-width: 0; background: var(--c-panel); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: 24px; }
.account-content h1 { font-size: var(--fs-xl); margin-bottom: 4px; }
.account-content .sub { color: var(--color-text-muted); font-size: var(--fs-sm); margin-bottom: 20px; }

/* order list */
.order-item { display: flex; align-items: center; gap: 14px; padding: 16px; border: 1px solid var(--color-border); border-radius: var(--radius-lg); margin-bottom: 12px; }
.order-item .thumb { width: 96px; height: 60px; border-radius: var(--radius-md); object-fit: cover; background: var(--color-surface-2); flex: none; }
.order-item .info { flex: 1; min-width: 0; }
.order-item .info .t { font-size: var(--fs-sm); font-weight: var(--fw-medium); }
.order-item .info .meta { font-size: var(--fs-xs); color: var(--color-text-muted); margin-top: 4px; }
.order-item .price { font-size: var(--fs-md); font-weight: var(--fw-semibold); color: var(--color-text); }
.order-item .status { font-size: var(--fs-xs); padding: 2px 8px; border-radius: var(--radius-sm); }
.order-item .status.paid { background: #ecfdf3; color: #079455; }
.order-item .status.pending { background: #fffaeb; color: #b54708; }
.order-item .status.cancel { background: var(--color-surface-2); color: var(--color-text-muted); }

/* coupon */
.coupon-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(280px,1fr)); gap: 16px; }
.coupon { position: relative; display: flex; border: 1px solid var(--color-border); border-radius: var(--radius-lg); overflow: hidden; }
.coupon .amt { width: 110px; flex: none; background: linear-gradient(135deg,#ff7a5c,#E74B3B); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.coupon .amt .n { font-size: var(--fs-2xl); font-weight: var(--fw-bold); }
.coupon .amt .u { font-size: var(--fs-xs); }
.coupon .info { flex: 1; padding: 14px 16px; }
.coupon .info .t { font-size: var(--fs-sm); font-weight: var(--fw-medium); }
.coupon .info .c { font-size: var(--fs-xs); color: var(--color-text-muted); margin-top: 6px; }
.coupon.used { opacity: .55; }
.coupon.used .amt { background: var(--color-surface-2); color: var(--color-text-muted); }

/* settings form rows */
.set-row { display: flex; align-items: center; justify-content: space-between; padding: 16px 0; border-bottom: 1px solid var(--color-border); }
.set-row .label { font-size: var(--fs-sm); }
.set-row .desc { font-size: var(--fs-xs); color: var(--color-text-muted); margin-top: 4px; }

/* loading / skeleton */
.xpc-loading { padding: 60px 0; text-align: center; color: var(--color-text-muted); font-size: var(--fs-sm); }
.xpc-loading .dots::after { content: ""; animation: xpcDots 1.2s steps(4,end) infinite; }
@keyframes xpcDots { 0%{content:"";} 25%{content:".";} 50%{content:"..";} 75%{content:"...";} }

/* ===========================================================
   创作者仪表板（真实数据 · 现代 UI）
   =========================================================== */
.dash { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 18px; }

/* --- 通用面板 --- */
.dash-panel { background: var(--c-panel); border: 1px solid var(--color-border); border-radius: 16px; padding: 22px 24px; }
.dash-panel__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.dash-panel__head h3 { margin: 0; font-size: var(--fs-lg); font-weight: var(--fw-semibold); }
.muted { color: var(--color-text-muted); font-size: var(--fs-xs); }
.link-more { font-size: var(--fs-sm); color: var(--color-primary); text-decoration: none; }
.link-more:hover { text-decoration: underline; }

/* --- 欢迎区 --- */
.dash-welcome { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  background: linear-gradient(120deg, #fff 0%, #fff 55%, rgba(231,75,59,.06) 100%); }
.dash-welcome-main { display: flex; align-items: center; gap: 16px; min-width: 0; }
.dash-avatar { width: 62px; height: 62px; border-radius: 50%; object-fit: cover; background: var(--color-surface-2); flex: none; box-shadow: 0 0 0 3px #fff, 0 0 0 4px var(--color-border); }
.dash-welcome-text { min-width: 0; }
.dash-title { font-size: var(--fs-xl); font-weight: var(--fw-semibold); margin: 0 0 6px; }
.dash-welcome-sub { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; color: var(--color-text-muted); font-size: var(--fs-sm); }
.dash-welcome-actions { display: flex; gap: 10px; flex: none; }

.dash-chip { font-size: var(--fs-xs); padding: 2px 8px; border-radius: 999px; background: var(--color-surface-2); color: var(--color-text-muted); }
.verify-badge { font-size: var(--fs-xs); padding: 2px 8px; border-radius: 999px; font-weight: var(--fw-medium); }
.verify-badge.is-ok   { background: #ecfdf3; color: #079455; }
.verify-badge.is-wait { background: #fffaeb; color: #b54708; }
.verify-badge.is-no   { background: #fef3f2; color: #d92d20; }

/* --- 核心数据概览 --- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(184px, 1fr)); gap: 14px; }
.stat-card { background: var(--c-panel); border: 1px solid var(--color-border); border-radius: 14px; padding: 16px 18px;
  display: flex; flex-direction: column; gap: 10px; transition: border-color .15s, box-shadow .15s, transform .15s; }
.stat-card:hover { border-color: rgba(22,119,255,.4); box-shadow: 0 8px 22px rgba(0,0,0,.06); transform: translateY(-2px); }
.stat-card--accent { background: linear-gradient(135deg, rgba(231,75,59,.07) 0%, rgba(231,75,59,.02) 70%, #fff 100%); border-color: rgba(231,75,59,.22); }
.stat-card__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.stat-card__label { font-size: var(--fs-xs); color: var(--color-text-muted); letter-spacing: .02em; }
.stat-card__icon { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; color: var(--color-text-muted); background: var(--color-surface-2); }
.stat-card--accent .stat-card__icon { background: rgba(231,75,59,.12); }
.stat-card__value { font-size: 26px; font-weight: var(--fw-bold); line-height: 1.15; letter-spacing: -.01em; }
.stat-card__value em { font-style: normal; font-size: 14px; font-weight: var(--fw-medium); color: var(--color-text-muted); margin-left: 2px; }
.stat-card__foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: var(--fs-xs); color: var(--color-text-muted); }

.trend { display: inline-flex; align-items: center; gap: 3px; font-size: var(--fs-xs); font-weight: var(--fw-medium); padding: 2px 6px; border-radius: 6px; }
.trend.is-up   { background: #fef3f2; color: #d92d20; }
.trend.is-down { background: #ecfdf3; color: #079455; }

/* --- 图表区 --- */
.chart-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.chart-card { display: flex; flex-direction: column; position: relative; }
.chart-card--wide { grid-column: 1 / -1; }
.chart-card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.chart-card__head h3 { margin: 0 0 3px; font-size: var(--fs-md); font-weight: var(--fw-semibold); }
.chart-card__sub { margin: 0; font-size: var(--fs-xs); color: var(--color-text-muted); }
.chart-card__meta { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; flex: none; }
.chart-card__meta .kpi { font-size: 18px; font-weight: var(--fw-bold); line-height: 1.2; }

/* --- 折线 / 面积图 --- */
.ch { display: flex; gap: 8px; position: relative; }
.ch__y { display: flex; flex-direction: column; justify-content: space-between; height: var(--ch-h, 200px);
  font-size: 10px; color: var(--color-text-light); text-align: right; flex: none; min-width: 42px; }
.ch__y span { line-height: 1; }
.ch__plot { position: relative; flex: 1; min-width: 0; height: var(--ch-h, 200px);
  border-left: 1px solid var(--color-border); border-bottom: 1px solid var(--color-border); }
.ch__svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.ch__grid { stroke: var(--color-border); stroke-width: 1; stroke-dasharray: 3 4; opacity: .8; }
.ch__hits { position: absolute; inset: 0; }
.ch__hit { position: absolute; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 50%;
  background: transparent; cursor: pointer; }
.ch__hit:hover { background: rgba(22,119,255,.9); box-shadow: 0 0 0 3px rgba(22,119,255,.18); }
/* 「暂无数据」占位。
   ⚠ pointer-events:none 是必须的：它是绝对定位并铺满 inset:0，
   若允许接收事件，会把整块区域（甚至整页）的点击都吃掉 —— 表现是
   「上面的按钮点不动」（2026-10-13 的 /account 顶部按钮就是被它挡住的）。
   同时给图表容器加 position:relative，让 inset:0 约束在卡片内而不是整页。 */
.ch__empty { position: absolute; inset: 0; display: grid; place-items: center; font-size: var(--fs-xs); color: var(--color-text-light); pointer-events: none; }
/* 列表型图表（bars / rank）里的空态：不参与绝对定位，直接回到文档流。
   根因：`.bars` 与 `ul.rank` 都没有定位上下文，一旦祖先链上也没有 position，
   absolute + inset:0 就以「初始包含块」为参照铺满整页 —— 整页点击全被吃掉，
   表现就是「上面的按钮点不动」（2026-10-13 /account 顶部两个按钮正是如此）。
   pointer-events:none 只是兜底；让这类事故不可能再发生的是这里改回常规流。 */
.bars > .ch__empty,
.rank > .ch__empty {
  position: static; min-height: 140px; display: grid; place-items: center;
}
.ch__x { display: flex; justify-content: space-between; margin: 6px 0 0 50px;
  font-size: 10px; color: var(--color-text-light); }
.ch__x span { flex: 1; text-align: center; overflow: hidden; white-space: nowrap; }
.ch__x span:first-child { text-align: left; }
.ch__x span:last-child { text-align: right; }

/* --- 柱状图 --- */
.bars { display: flex; align-items: flex-end; gap: 6px; height: var(--bars-h, 180px); }
.bars__col { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; }
.bars__track { flex: 1; width: 100%; display: flex; align-items: flex-end; min-height: 0; }
.bars__bar { width: 100%; max-width: 34px; margin: 0 auto; border-radius: 5px 5px 0 0; min-height: 2px;
  transition: opacity .15s; }
.bars__col:hover .bars__bar { opacity: .82; }
.bars__val { font-size: 10px; color: var(--color-text-muted); line-height: 1; }
.bars__label { font-size: 10px; color: var(--color-text-light); line-height: 1; }

/* --- 横向排行条 --- */
.rank { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.rank__row { display: grid; grid-template-columns: 74px 1fr 58px 40px; align-items: center; gap: 10px; font-size: var(--fs-xs); }
.rank__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--color-text-strong); }
.rank__track { height: 8px; border-radius: 999px; background: var(--color-surface-2); overflow: hidden; }
.rank__track i { display: block; height: 100%; border-radius: 999px; }
.rank__val { text-align: right; color: var(--color-text-strong); font-weight: var(--fw-medium); }
.rank__pct { text-align: right; color: var(--color-text-muted); }

/* --- 作品表现榜 --- */
.perf-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.perf-row { display: grid; grid-template-columns: 26px minmax(0, 1fr) 1.2fr 72px 78px; align-items: center; gap: 12px; }
.perf-no { width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center;
  font-size: 11px; font-weight: var(--fw-bold); background: var(--color-surface-2); color: var(--color-text-muted); }
.perf-row:nth-child(1) .perf-no { background: #fef3f2; color: #d92d20; }
.perf-row:nth-child(2) .perf-no { background: #fffaeb; color: #b54708; }
.perf-row:nth-child(3) .perf-no { background: var(--color-primary-bg); color: var(--color-primary); }
.perf-title { font-size: var(--fs-sm); color: var(--color-text-strong); text-decoration: none;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.perf-title:hover { color: var(--color-primary); }
.perf-bar { height: 8px; border-radius: 999px; background: var(--color-surface-2); overflow: hidden; }
.perf-bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #ff8a70, #e74b3b); }
.perf-num { text-align: right; font-size: var(--fs-sm); font-weight: var(--fw-semibold); }
.perf-sub { text-align: right; font-size: var(--fs-xs); color: var(--color-text-muted); }

/* --- 功能中心卡片 --- */
.dash-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 14px; }
.dash-card { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 18px; border: 1px solid var(--color-border); border-radius: 14px; background: var(--color-surface); text-decoration: none; color: var(--color-text-strong); transition: border-color .15s, transform .15s, box-shadow .15s; }
.dash-card:hover { border-color: var(--color-primary); transform: translateY(-3px); box-shadow: 0 10px 24px rgba(0,0,0,.07); }
.dash-card-icon { width: 40px; height: 40px; display: grid; place-items: center; line-height: 0; border-radius: 12px; background: var(--c-panel); border: 1px solid var(--color-border); color: var(--color-text-muted); transition: background .15s, color .15s, border-color .15s; }
.dash-card:hover .dash-card-icon { background: var(--color-primary-bg); border-color: transparent; color: var(--color-primary); }

/* --- 分段切换控件（作品区块） --- */
.seg { display: inline-flex; gap: 2px; padding: 3px; background: var(--color-surface-2); border-radius: 10px; }
.seg__btn { padding: 6px 14px; border: 0; border-radius: 8px; background: transparent; cursor: pointer;
  font-size: var(--fs-xs); color: var(--color-text-muted); font-family: inherit; line-height: 1.4;
  transition: background .15s, color .15s; }
.seg__btn:hover { color: var(--color-text-strong); }
.seg__btn.is-active { background: var(--c-panel); color: var(--color-text-strong); font-weight: var(--fw-medium); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.dash-card-label { font-size: var(--fs-sm); font-weight: var(--fw-medium); }
.dash-card-count { font-size: var(--fs-xs); color: var(--color-text-muted); }

/* --- 关注 / 粉丝页头与切换 Tab --- */
.dash-tabs { display: flex; gap: 8px; padding: 4px; background: var(--color-surface-2); border-radius: 12px; width: fit-content; }
.dash-tab { padding: 8px 16px; border-radius: 9px; font-size: var(--fs-sm); color: var(--color-text-muted); text-decoration: none; white-space: nowrap; transition: background .15s, color .15s; }
.dash-tab:hover { color: var(--color-text-strong); }
.dash-tab.is-active { background: var(--c-panel); color: var(--color-text-strong); font-weight: var(--fw-medium); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.dash-tab em { font-style: normal; font-size: var(--fs-xs); color: var(--color-text-muted); margin-left: 6px; }

/* --- 用户列表（关注 / 粉丝） --- */
.user-list { display: flex; flex-direction: column; gap: 10px; }
.user-row { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--color-border); border-radius: 14px; background: var(--c-panel); transition: border-color .15s, box-shadow .15s; }
.user-row:hover { border-color: rgba(22,119,255,.35); box-shadow: 0 6px 18px rgba(0,0,0,.05); }
.user-row-avatar { flex: none; width: 48px; height: 48px; border-radius: 50%; overflow: hidden; background: var(--color-surface-2); }
.user-row-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.user-row-info { flex: 1; min-width: 0; }
.user-row-name { display: flex; align-items: center; gap: 6px; font-size: var(--fs-sm); font-weight: var(--fw-medium); }
.user-row-name a { color: inherit; text-decoration: none; }
.user-row-name a:hover { color: var(--color-primary); }
.user-row-meta { margin-top: 4px; font-size: var(--fs-xs); color: var(--color-text-muted); }
.user-row-meta .dot { margin: 0 6px; opacity: .55; }
.user-row .follow-btn { flex: none; min-width: 92px; }

/* --- 空态 --- */
.dash .empty-state { text-align: center; padding: 40px 0; color: var(--color-text-muted); font-size: var(--fs-sm); }
.dash .empty-state p { margin: 0 0 14px; }

/* --- 响应式 --- */
@media (max-width: 1100px) {
  .chart-grid { grid-template-columns: 1fr; }
  .chart-card--wide { grid-column: auto; }
}
@media (max-width: 900px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .perf-row { grid-template-columns: 26px minmax(0, 1fr) 72px; }
  .perf-bar, .perf-sub { display: none; }
}
@media (max-width: 640px) {
  .dash-cards { grid-template-columns: repeat(2, 1fr); }
  .dash-welcome { flex-direction: column; align-items: flex-start; }
  .dash-welcome-actions { width: 100%; }
  .dash-welcome-actions .btn { flex: 1; }
  .user-row { flex-wrap: wrap; }
  .dash-panel { padding: 18px 16px; }
}
