/* 全站宽侧栏：品牌 / 新建 / 横向图标文字 / 底栏 */

.pf-shell.pf-shell-vside {
  flex-direction: column;
  align-items: stretch;
  padding: 0;
  box-sizing: border-box;
  min-height: 100vh;
  min-height: 100dvh;
}

.pf-shell-main-row {
  flex: 1 1 auto;
  display: flex;
  align-items: stretch;
  padding: 0;
  min-height: 0;
  height: 100dvh;
}

.pf-shell-body {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: auto;
}

.pf-main-extra {
  flex: 0 0 auto;
  padding: 10px 18px 0;
}

.pf-shell.pf-shell-bare {
  height: 100%;
  min-height: 100dvh;
}

.pf-shell.pf-shell-bare .pf-shell-main-row {
  padding: 0;
  height: 100%;
}

.pf-side {
  flex: 0 0 248px;
  width: 248px;
  position: sticky;
  top: 0;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  background: #fff;
  border: 0;
  border-right: 1px solid var(--pf-line, #eceef2);
  border-radius: 0;
  color: #5b616b;
  padding: 18px 14px 12px;
  box-sizing: border-box;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 40;
  scrollbar-width: none;
}

.pf-side::-webkit-scrollbar {
  display: none;
}

.pf-float-brand {
  display: none;
}

.pf-side-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 2px 4px 16px;
}

.pf-side-fold {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #6b7280;
  cursor: pointer;
}

.pf-side-fold:hover {
  background: #f3f4f6;
  color: #16181d;
}

.pf-side-brand .brand-mark {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.pf-side-brand .brand-logo {
  width: 32px;
  height: 32px;
}

.pf-side-brand .brand-word {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.01em;
  color: var(--pf-ink, #16181d);
}

.pf-side-new {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 40px;
  margin: 0 0 16px;
  border: 1px solid var(--pf-line, #e6e8ec);
  border-radius: 999px;
  background: #fff;
  color: var(--pf-ink, #16181d);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
}

.pf-side-new:hover {
  background: #f6f7f9;
}

.pf-side-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1 1 auto;
}

.pf-side-item,
.pf-side-group-head {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  color: #3c4350;
  text-decoration: none;
  background: transparent;
  border: 0;
  width: 100%;
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition: background 0.15s, color 0.15s;
}

.pf-side-item span,
.pf-side-group-head span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pf-side-item:hover,
.pf-side-group-head:hover {
  background: #f3f4f6;
  color: #16181d;
}

.pf-side-item.active,
.pf-side-group.on .pf-side-group-head {
  background: #eceff3;
  color: #16181d;
  font-weight: 600;
}

.pf-side-item.active::before,
.pf-shell.is-light .pf-side-item.active::before,
:is(.pf-shell.is-dark, .pf-theme-dark) .pf-side-item.active::before,
.pf-shell:has(.pf-home.is-light) .pf-side-item.active::before {
  display: none !important;
}

.pf-side-item.active svg,
.pf-side-group.on .pf-side-group-head svg {
  color: inherit;
}

.pf-side-group-row {
  display: flex;
  align-items: center;
  gap: 2px;
}

.pf-side-group-row .pf-side-item {
  flex: 1 1 auto;
  min-width: 0;
}

.pf-side-group-toggle {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.pf-side-group-toggle:hover {
  background: #f3f4f6;
}

.pf-side-group-chev {
  flex: 0 0 auto;
  opacity: 0.55;
  transition: transform 0.15s ease;
}

.pf-side-group.open .pf-side-group-chev {
  transform: rotate(90deg);
}

.pf-side-group-body {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 2px 0 8px 12px;
}

.pf-side-sub {
  display: block;
  padding: 7px 12px;
  border-radius: 10px;
  color: #6b7280;
  text-decoration: none;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pf-side-sub:hover,
.pf-side-sub.active {
  background: #f3f4f6;
  color: #16181d;
}

.pf-side-foot {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  padding-top: 10px;
  margin-top: auto;
}

.pf-side-promo {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 999px;
  background: #f3f4f6;
  color: #16181d;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
}

.pf-side-promo:hover {
  background: #eceff3;
}

.pf-side-tools {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.pf-side-tools .pf-nav-lang {
  margin-right: auto;
}

.pf-side-tool {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #6b7280;
  cursor: pointer;
  text-decoration: none;
  font: inherit;
  font-size: 12px;
}

.pf-side-tool:hover,
.pf-side-tool.open {
  background: #f3f4f6;
  color: #16181d;
}

.pf-side-tool-user {
  padding: 0;
  overflow: hidden;
}

.is-dark .pf-side {
  background: #16181c;
  border-right-color: rgba(255, 255, 255, 0.08);
  color: #9aa0a6;
}

.is-dark .pf-side-brand .brand-word {
  color: #f3f4f6;
}

.is-dark .pf-side-new {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.12);
  color: #f3f4f6;
}

.is-dark .pf-side-new:hover,
.is-dark .pf-side-item:hover,
.is-dark .pf-side-group-toggle:hover,
.is-dark .pf-side-group-head:hover,
.is-dark .pf-side-sub:hover,
.is-dark .pf-side-sub.active,
.is-dark .pf-side-tool:hover,
.is-dark .pf-side-tool.open {
  background: rgba(255, 255, 255, 0.06);
  color: #f3f4f6;
}

.is-dark .pf-side-item,
.is-dark .pf-side-group-head {
  color: #c5cad3;
}

.is-dark .pf-side-item.active,
.is-dark .pf-side-group.on .pf-side-group-head {
  background: #2a2e36;
  color: #fff;
}

.is-dark .pf-side-promo {
  background: #2a2e36;
  color: #fff;
}

.is-dark .pf-side-sub {
  color: #9aa0a6;
}

.is-dark .pf-side-fold:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #f3f4f6;
}

.pf-side.is-off {
  flex: 0 0 72px;
  width: 72px;
  padding: 12px 8px 10px;
}

.pf-side.is-off .pf-side-brand {
  flex-direction: column;
  padding: 0 0 10px;
}

.pf-side.is-off .brand-word,
.pf-side.is-off .pf-side-item span,
.pf-side.is-off .pf-side-promo span,
.pf-side.is-off .pf-nav-lang,
.pf-side.is-off .pf-side-group-toggle,
.pf-side.is-off .pf-side-group-body {
  display: none;
}

.pf-side.is-off .pf-side-new {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin: 0 auto 12px;
  padding: 0;
  font-size: 0;
  gap: 0;
}

.pf-side.is-off .pf-side-new svg {
  display: block;
}

.pf-side.is-off .pf-side-item,
.pf-side.is-off .pf-side-group-head {
  justify-content: center;
  padding: 10px 0;
  gap: 0;
}

.pf-side.is-off .pf-side-promo {
  justify-content: center;
  padding: 8px;
}

.pf-side.is-off .pf-side-tools {
  justify-content: center;
}

.pf-side.is-off .pf-side-userpanel {
  left: 80px;
}

@media (max-width: 880px) {
  .pf-shell.pf-shell-vside {
    flex-direction: column;
    padding: 0;
  }
  .pf-shell-main-row {
    flex-direction: column;
    padding: 0;
    height: auto;
    min-height: 100dvh;
  }
  .pf-side {
    position: sticky;
    top: 0;
    flex: 0 0 auto;
    width: 100%;
    height: auto;
    margin: 0;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-right: 0;
    border-bottom: 1px solid var(--pf-line, #eceef2);
    overflow-x: auto;
    overflow-y: hidden;
  }
  .pf-side-brand {
    display: block;
    padding: 0 8px 0 0;
  }
  .pf-side-new {
    width: auto;
    margin: 0;
    padding: 0 14px;
    height: 34px;
  }
  .pf-side-nav {
    flex-direction: row;
    flex: 1 1 auto;
    overflow-x: auto;
  }
  .pf-side-item,
  .pf-side-group-head {
    padding: 6px 10px;
    white-space: nowrap;
    width: auto;
  }
  .pf-side-group-body {
    display: none;
  }
  .pf-side-foot {
    flex-direction: row;
    padding-top: 0;
    margin-top: 0;
    width: 100%;
  }
  .pf-side-tools {
    margin-left: auto;
  }
}

/* ── 全站顶部导航条：logo 同条平铺，无框；滚动时吸顶 ── */
.pf-topbar {
  position: sticky;
  top: 0;
  z-index: 45;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 14px;
  padding: 8px 10px 8px 18px;
  /* 无边框：仅一层与页面同色的半透明底 + 模糊，内容穿过时保持可读 */
  background: color-mix(in srgb, #f7f8f4 94%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.is-dark .pf-topbar {
  background: rgba(14, 15, 21, 0.92);
}

.pf-topbar-brand {
  display: inline-flex;
  align-items: center;
  margin-right: 10px;
  flex-shrink: 0;
}

.pf-topbar-brand .brand-logo {
  width: 30px;
  height: 30px;
}

.pf-topbar-brand .brand-word {
  display: inline;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--pf-ink, #16181d);
  white-space: nowrap;
}

.pf-topbar-group {
  display: flex;
  align-items: center;
  gap: 2px;
}

.pf-topbar-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 13px;
  border: 0;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  color: var(--pf-muted);
  background: transparent;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
}

.pf-topbar-item:hover {
  color: var(--pf-ink, var(--pf-muted));
  background: var(--pf-lime-soft);
}

.is-dark .pf-topbar-item:hover {
  color: #b6ff00;
}

.pf-topbar-icon {
  padding: 6px 9px;
}

.pf-topbar-divider {
  width: 1px;
  height: 16px;
  margin: 0 6px;
  background: var(--pf-line);
}

/* 顶栏余额胶囊：✦ 图标 + 粗体余额（登录后显示） */
.pf-topbar-wallet {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--pf-lime-soft);
  font-size: 13px;
  color: var(--pf-ink, var(--pf-muted));
  white-space: nowrap;
}

.pf-topbar-wallet svg {
  color: #8db600;
}

.is-dark .pf-topbar-wallet svg {
  color: #b6ff00;
}

.pf-topbar-wallet strong {
  font-weight: 700;
  letter-spacing: 0.01em;
}

/* 充值入口：压重一点引导点击 */
.pf-topbar-topup {
  color: var(--pf-ink, var(--pf-muted));
  font-weight: 600;
}

.pf-topbar-user {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 10px 4px 5px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--pf-ink, var(--pf-muted));
  font-size: 13px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.pf-topbar-user:hover {
  background: var(--pf-lime-soft);
}

.pf-topbar-user-name {
  max-width: 96px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}

@media (max-width: 760px) {
  .pf-topbar-brand .brand-word {
    display: none;
  }

  .pf-topbar-wallet,
  .pf-topbar-topup,
  .pf-topbar-item span {
    display: none;
  }

  .pf-topbar-item {
    padding: 7px 10px;
  }
}

/* ── 侧栏底部用户头像 + 个人菜单 ── */
.pf-side-userwrap {
  position: relative;
  width: 100%;
}

.pf-side-usermenu {
  width: 100%;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.pf-side-usermenu .pf-user-avatar {
  flex: 0 0 auto;
}

.pf-side-usermenu span {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pf-side-usermenu.open,
.pf-side-usermenu:hover {
  color: #d9ff7a;
}

.pf-side-userclickaway {
  position: fixed;
  inset: 0;
  z-index: 45;
}

.pf-side-userpanel {
  position: fixed;
  bottom: 16px;
  left: 260px;
  z-index: 50;
  width: 236px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 16px;
  padding: 12px;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.18);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pf-side-userpanel-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 2px 4px 8px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.pf-side-userpanel-id {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.pf-side-userpanel-id strong {
  font-size: 14px;
  color: #16181d;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pf-side-userpanel-id small {
  font-size: 11.5px;
  color: #8a92a0;
}

.pf-side-userpanel-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pf-side-userpanel-nav button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 10px;
  padding: 9px 10px;
  font-size: 13px;
  color: #3c4350;
  cursor: pointer;
}

.pf-side-userpanel-nav button:hover:not(:disabled) {
  background: rgba(15, 23, 42, 0.05);
  color: #16181d;
}

.pf-side-userpanel-nav button:disabled {
  cursor: default;
  color: #a6adba;
}

.pf-side-userpanel-nav button em {
  font-style: normal;
  font-size: 10px;
  color: #8a92a0;
  background: rgba(15, 23, 42, 0.06);
  border-radius: 999px;
  padding: 2px 7px;
  margin-left: auto;
}

.pf-side-userpanel-logout {
  width: 100%;
  background: rgba(15, 23, 42, 0.04);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 10px;
  padding: 9px 10px;
  font-size: 13px;
  font-weight: 600;
  color: #d4553f;
  cursor: pointer;
}

.pf-side-userpanel-logout:hover {
  background: rgba(212, 85, 63, 0.08);
}

/* === 顶栏用户下拉菜单（头像区点击弹出） === */
.pf-topbar-userwrap {
  position: relative;
  display: inline-flex;
}

.pf-topbar-user.open {
  background: var(--pf-lime-soft);
}

.pf-topbar-usermenu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 184px;
  background: var(--pf-card);
  border: 1px solid var(--pf-line, #e5e7eb);
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(17, 24, 39, 0.14);
  padding: 6px;
  z-index: 60;
}

.pf-topbar-usermenu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px 6px;
}

.pf-topbar-usermenu-name {
  max-width: 96px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 700;
  color: var(--pf-ink);
}

.pf-topbar-usermenu-balance {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--pf-ink);
}

.pf-topbar-usermenu-item {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 0;
  background: transparent;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 500;
  color: var(--pf-ink, var(--pf-muted));
  cursor: pointer;
  text-align: left;
  transition: background 0.15s ease;
}

.pf-topbar-usermenu-item:hover {
  background: var(--pf-lime-soft);
}

.pf-topbar-usermenu-item--danger {
  color: #d4553f;
}

.pf-topbar-usermenu-item--danger:hover {
  background: rgba(212, 85, 63, 0.08);
}

.pf-topbar-usermenu-divider {
  display: block;
  height: 1px;
  margin: 6px 8px;
  background: var(--pf-line, #e5e7eb);
}
