/* ===== 应用外壳：侧栏、顶栏、底部导航 ===== */
/* =========================================================
   应用外壳
   ========================================================= */
.app-shell { min-height: 100vh; padding-top: 72px; padding-left: 208px; transition: padding .2s; }
.app-shell.compact { padding-left: 76px; }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  width: 208px;
  padding: 18px 14px;
  background: #fff;
  border-right: 1px solid var(--border);
  transition: width .2s;
}
.compact .sidebar { width: 76px; }
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  height: 42px;
  overflow: hidden;
  font-size: 16px;
  font-weight: 750;
  white-space: nowrap;
}
.sidebar nav { display: flex; flex-direction: column; gap: 5px; margin-top: 30px; }
.sidebar nav button,
.collapse {
  position: relative;   /* .nav-dot 是 absolute，父级必须有定位上下文 */
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 0 12px;
  overflow: hidden;
  color: #64748b;
  background: none;
  border: 0;
  border-radius: 10px;
  font-weight: 550;
  white-space: nowrap;
  transition: color .15s, background .15s;
}
.sidebar nav button:hover,
.sidebar nav button.active { color: var(--blue); background: var(--pale); }
.sidebar nav button.active { font-weight: 700; }
.sidebar nav button { position: relative; }
.sidebar nav button .icon { width: 19px; height: 19px; }
.nav-dot {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 7px;
  height: 7px;
  background: #ef4444;
  border-radius: 50%;
  box-shadow: 0 0 0 3px #fff;
  pointer-events: none;
}
.collapse { margin-top: auto; }
.collapse .icon { width: 18px; height: 18px; transition: transform .2s; }
.compact .collapse .icon { transform: rotate(180deg); }
.compact .sidebar span { display: none; }
.compact .brand { justify-content: center; }

.topbar {
  position: fixed;
  top: 0;
  left: 208px;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  padding: 0 24px;
  background: rgba(255, 255, 255, .85);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  transition: left .2s;
}
.compact .topbar { left: 76px; }
.topbar-context-group { display: flex; align-items: center; gap: 28px; min-width: 0; flex: 1; }
.top-context { display: flex; flex-direction: column; gap: 3px; font-weight: 700; white-space: nowrap; }
.top-context small { color: var(--muted); font-weight: 400; }
.top-actions { display: flex; align-items: center; gap: 10px; flex: none; }

.points-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 14px;
  color: var(--blue);
  background: #f4f7ff;
  border: 1px solid #dbe4ff;
  border-radius: 12px;
  font-weight: 750;
}
.points-pill .icon { width: 16px; height: 16px; }
.points-pill small { font-weight: 500; }
.points-pill.error { color: #b91c1c; background: #fef2f2; border-color: #fecaca; }
.avatar {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  color: #fff;
  background: #172554;
  border: 0;
  border-radius: 12px;
  font-weight: 700;
  text-transform: uppercase;
}
/* 右上角账号标识：账号名称 + 会员类型（VIP n / 普通账号 / 管理员） */
.account-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 240px;
  height: 40px;
  padding: 0 12px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.account-chip:hover {
  border-color: #bdcaff;
  box-shadow: 0 2px 10px rgba(23, 37, 84, .1);
}
.account-chip-name {
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}
.account-chip-tag {
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
  letter-spacing: .2px;
}
.account-chip-tag.is-vip {
  color: #92400e;
  background: linear-gradient(180deg, #fef3c7, #fde68a);
  border-color: #fbbf24;
}
.account-chip-tag.is-normal {
  color: #475569;
  background: #f1f5f9;
  border-color: #cbd5e1;
}
.account-chip-tag.is-admin {
  color: #1e40af;
  background: #e0e7ff;
  border-color: #a5b4fc;
}
@media (max-width: 720px) {
  .account-chip { padding: 0 8px; gap: 6px; }
  .account-chip-name { max-width: 72px; }
}
.announcement-shortcut {
  position: relative;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  color: #526178;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 11px;
}
.announcement-shortcut:hover { color: var(--blue); border-color: #bdcaff; background: #f8faff; }
.announcement-shortcut .icon { width: 18px; height: 18px; }
.announcement-shortcut .badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  color: var(--blue);
  background: #eef3ff;
  border: 2px solid #fff;
  border-radius: 6px;
  font-size: 9px;
  font-weight: 700;
  line-height: 12px;
  text-align: center;
}

/* 公告滚动条 */
.announcement-ticker {
  position: relative;
  flex: 1;
  min-width: 0;
  height: 44px;
  margin-right: 18px;
  padding: 0;
  overflow: hidden;
  color: #334155;
  background: #f8faff;
  border: 1px solid #dbe4ff;
  border-radius: 11px;
  cursor: pointer;
  transition: background .16s, border-color .16s;
}
.announcement-ticker:hover { background: #f1f5ff; border-color: #b8c7ff; }
.announcement-ticker-window {
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
}
.announcement-ticker-track {
  display: flex;
  align-items: center;
  width: max-content;
  will-change: transform;
  animation: announcement-ticker-ltr var(--ticker-duration, 28s) linear infinite;
}
.announcement-ticker:hover .announcement-ticker-track { animation-play-state: paused; }
.announcement-ticker-copy {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: max(680px, 50vw);
  height: 42px;
  padding: 0 32px;
  font-size: 13px;
  white-space: nowrap;
}
.announcement-ticker-copy .icon { width: 16px; height: 16px; color: var(--blue); }
.announcement-ticker-copy strong { flex: none; color: var(--blue); font-size: 12px; }
.announcement-ticker-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
}
@keyframes announcement-ticker-ltr {
  0% { transform: translate(-33.3333%); }
  100% { transform: translate(0); }
}

/* 内容区 */
.content { max-width: 1800px; margin: 0 auto; padding: 30px 32px 48px; }
.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}
.page-heading h1 { margin: 7px 0; font-size: 30px; letter-spacing: -.03em; }
.page-heading p { margin: 0; color: var(--muted); }
.page-heading .heading-actions { display: flex; gap: 10px; flex: none; }
.page-heading .secondary-button .icon { width: 17px; height: 17px; }
