/* ===== 全站统一顶部用户信息栏（与「我的」页布局一致） ===== */
.top-userbar {
  position: fixed; top: 0; left: 260px; right: 0; height: 60px;
  display: flex; align-items: center; justify-content: flex-end;
  background: linear-gradient(90deg, #000 0%, rgba(255, 145, 50, .05) 100%);
  padding: 0 24px; z-index: 100; box-sizing: border-box;
}
.top-userbar .top-userbar-inner { position: relative; display: flex; align-items: center; gap: 12px; }
.top-userbar ~ .container.page { padding-top: 88px; }
@media (max-width: 900px) {
  .top-userbar { left: 200px; height: 56px; padding: 0 14px; }
  .top-userbar ~ .container.page { padding-top: 82px; }
  .top-userbar .topbar-user { display: none; }
}

/* ===== 顶部用户信息触发器 ===== */
.user-trigger { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 10px; cursor: pointer; transition: all .2s; position: relative; }
.user-trigger:hover { background: rgba(255,255,255,.06); }
.user-trigger .avatar { width: 30px; height: 30px; font-size: 14px; margin: 0; flex-shrink: 0; }
.user-trigger .topbar-user { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.user-trigger .topbar-uname { font-size: 13px; color: var(--text); white-space: nowrap; }
.user-trigger .tenant-chip { margin: 0; }

/* ===== 未登录登录按钮（原 .topbar-right .login-btn 移入顶部栏） ===== */
.top-userbar .login-btn {
  display: flex; align-items: center; justify-content: center;
  width: auto; min-width: 84px; padding: 8px 14px; border-radius: 9px;
  font-size: 13px; font-weight: 600; letter-spacing: 1px;
  color: #fff; background: linear-gradient(135deg, #ff7f0f, #ff9132);
  box-shadow: 0 4px 14px rgba(255, 140, 41, 0.35);
  transition: all 0.2s;
}
.top-userbar .login-btn:hover { color: #fff; filter: brightness(1.08); box-shadow: 0 6px 18px rgba(255, 140, 41, 0.45); }

/* ===== 用户菜单弹窗（布局参考 reelmate.cn，数据/主题为我们的） ===== */
.user-menu-pop {
  position: absolute; top: calc(100% + 10px); right: 0; width: 256px;
  background: #12162a; border: 1px solid rgba(255,255,255,.09); border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,.4); padding: 8px; display: none; z-index: 120;
}
.user-menu-pop.open { display: block; animation: umPopIn .2s ease; }
@keyframes umPopIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
.um-user { display: flex; align-items: center; gap: 10px; padding: 8px 10px 10px; }
.um-user .avatar { width: 40px; height: 40px; font-size: 17px; margin: 0; flex-shrink: 0; }
.um-ti { flex: 1; min-width: 0; }
.um-ti .um-name { font-size: 13.5px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.um-ti .um-role { font-size: 11.5px; color: var(--text-dim); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.um-tenant {
  display: flex; align-items: center; padding: 10px; margin: 2px 0 8px;
  border-radius: 10px; border: none;
  background: #16171f;
}
/* 积分两行（剩余积分 / 平台实时余额）靠左，充值按钮右侧与两行并列、垂直居中 */
.um-credit {
  flex: 1; display: grid; grid-template-columns: 1fr auto; grid-template-areas: "v btn" "t btn";
  align-items: center; column-gap: 12px; text-align: left;
}
.um-credit .v { grid-area: v; font-size: 13px; font-weight: 800; color: var(--amber); white-space: nowrap; }
.um-credit .t { grid-area: t; font-size: 10.5px; color: var(--text-faint); margin: 0; }
.um-credit button { grid-area: btn; justify-self: end; align-self: center; flex-shrink: 0; }
.um-menu { max-height: 60vh; overflow-y: auto; scrollbar-width: none; -ms-overflow-style: none; } /* 隐藏滚动条，保留滚轮/触控滚动 */
.um-menu::-webkit-scrollbar { display: none; width: 0; height: 0; }
.um-item {
  display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 12px;
  border-radius: 8px; font-size: 13.5px; color: var(--text-dim); cursor: pointer;
  transition: all .15s; box-sizing: border-box; width: 100%;
}
.um-item:hover { background: rgba(255,127,15,.10); color: #ffb066; }
.um-item.active { background: rgba(255,140,41,.18); color: #fff; }
.um-item .n { margin-left: auto; font-size: 11px; color: var(--text-faint); background: rgba(255,255,255,.08); padding: 1px 7px; border-radius: 999px; }
.um-item.active .n { color: #ffb066; background: rgba(255,140,41,.25); }
.um-divider { height: 1px; background: rgba(255,255,255,.12); margin: 6px 8px; }
.um-logout { margin-top: 2px; justify-content: center; text-align: center; } /* 退出登录居中展示 */
.um-logout:hover { background: rgba(248,113,113,.12); color: #fca5a5; }

/* ===== 顶部用户栏：创作手册 + 我的任务入口（用户信息左侧；样式集中于此，调整只改本文件） ===== */
.top-userbar .doc-link,
.top-userbar .mes-task-link {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 6px 14px; border-radius: 999px;              /* 胶囊 */
  font-size: 13px; color: #fff; line-height: 1;
  background: #c2ccf11f;                                /* rgba(194,204,241,.12) */
  border: 1px solid #c2ccf10a;                          /* rgba(194,204,241,.04) */
  backdrop-filter: blur(6px);
  transition: background-color .2s;
  text-decoration: none; white-space: nowrap;
}
.top-userbar .doc-link svg { width: 14px; height: 14px; flex-shrink: 0; display: block; margin-top: 1px;}
.top-userbar .doc-link:hover,
.top-userbar .mes-task-link:hover { background: rgba(194,204,241,.2); }  /* hover 仅背景 .12→.2（对齐 reelmate） */

/* 窄屏（≤600px）：顶栏宽度不足以容纳两枚胶囊，收起「创作手册」保留「我的任务」（桌面/平板不受影响） */
@media (max-width: 600px) {
  .top-userbar .doc-link { display: none; }
}
