* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
html.has-token body { overflow: hidden; }
:root {
  --c-bg: #f0f2f5;
  --c-surface: #fff;
  --c-surface-soft: #fafafa;
  --c-border: #e6e6e6;
  --c-border-light: #ebeef5;
  --c-text: #303133;
  --c-text-secondary: #606266;
  --c-text-muted: #909399;
  --c-primary: #409eff;
  --c-shadow: rgba(0, 0, 0, 0.04);
  /* 侧栏 · 浅色主题（偏白清爽） */
  --sidebar-bg: #f8fafc;
  --sidebar-bg-image: linear-gradient(180deg, #ffffff 0%, #f3f6f9 55%, #eef2f6 100%);
  --sidebar-logo-bg: #ffffff;
  --sidebar-logo-border: #e8ecf0;
  --sidebar-logo-title: #1f2937;
  --sidebar-logo-sub: #6b7280;
  --sidebar-text: #4b5563;
  --sidebar-text-muted: #9ca3af;
  --sidebar-divider: rgba(15, 23, 42, 0.08);
  --sidebar-hover-bg: rgba(64, 158, 255, 0.1);
  --sidebar-active-bg: rgba(64, 158, 255, 0.14);
  --sidebar-active-text: #2563eb;
  --sidebar-active-bar: #409eff;
  --sidebar-stat-num: #111827;
  --sidebar-stat-label: #6b7280;
  --sidebar-region-card-bg: #ffffff;
  --sidebar-region-card-border: #e5e7eb;
  --sidebar-shadow: 2px 0 14px rgba(15, 23, 42, 0.06);
}
html[data-theme="dark"] {
  --c-bg: #000000;
  --c-surface: #0a0a0a;
  --c-surface-soft: #141414;
  --c-border: #2e2e2e;
  --c-border-light: #222222;
  --c-text: #ffffff;
  --c-text-secondary: #e8e8e8;
  --c-text-muted: #b0b0b0;
  --c-primary: #58a6ff;
  --c-shadow: rgba(0, 0, 0, 0.55);
  /* 侧栏 · 深色主题 */
  --sidebar-bg: #0a0e14;
  --sidebar-bg-image: linear-gradient(168deg, #121820 0%, #0a0e14 45%, #06080c 100%);
  --sidebar-logo-bg: linear-gradient(180deg, #141a22 0%, #0d1117 100%);
  --sidebar-logo-border: rgba(255, 255, 255, 0.06);
  --sidebar-logo-title: #f0f3f6;
  --sidebar-logo-sub: #8b949e;
  --sidebar-text: #b8c4d0;
  --sidebar-text-muted: #7d8b99;
  --sidebar-divider: rgba(255, 255, 255, 0.07);
  --sidebar-hover-bg: rgba(88, 166, 255, 0.12);
  --sidebar-active-bg: rgba(88, 166, 255, 0.2);
  --sidebar-active-text: #79bbff;
  --sidebar-active-bar: #58a6ff;
  --sidebar-stat-num: #f0f3f6;
  --sidebar-stat-label: #8b949e;
  --sidebar-region-card-bg: rgba(255, 255, 255, 0.04);
  --sidebar-region-card-border: rgba(255, 255, 255, 0.08);
  --sidebar-shadow: 2px 0 16px rgba(0, 0, 0, 0.45);
  color-scheme: dark;
}
body { font-family: "Helvetica Neue", "PingFang SC", "Microsoft YaHei", sans-serif; background: var(--c-bg); color: var(--c-text); font-size: 14px; }
.hidden { display: none !important; }

/* 已登录刷新：先藏登录页，等 JS 验证 token（避免闪一下登录框） */
html.has-token #loginPage { display: none !important; }
html.has-token #appPage.hidden { display: flex !important; }
a { color: #409eff; text-decoration: none; }

/* 登录 */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #304156, #1a2332) !important;
  color: #303133;
  color-scheme: light;
}
.login-card {
  background: #fff;
  width: min(400px, 88vw);
  aspect-ratio: 1 / 1;
  padding: 22px 30px;
  border-radius: 10px;
  box-shadow: 0 8px 30px rgba(0,0,0,.25);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
}
.login-card h1 { text-align: center; font-size: 20px; color: #304156; margin: 0; }
.login-sub { text-align: center; color: #909399; font-size: 12px; margin: 6px 0 14px; }
.login-card input {
  width: 100%;
  height: 40px;
  border: 1px solid #dcdfe6;
  border-radius: 4px;
  padding: 0 12px;
  margin-bottom: 10px;
  font-size: 15px;
  background: #fff;
  color: #303133;
  box-sizing: border-box;
}
.login-captcha-row { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; }
.login-captcha-row input { flex: 1; margin-bottom: 0; font-size: 16px; }
.login-captcha-img { flex-shrink: 0; height: 40px; border: 1px solid #dcdfe6; border-radius: 4px; cursor: pointer; background: #f5f7fa; }
.server-warn { background: #fef0f0; color: #f56c6c; padding: 10px; border-radius: 4px; font-size: 12px; margin-bottom: 12px; }
/* 布局：左侧固定，右侧内容区单独滚动 */
.app-shell { display: flex; height: 100vh; min-height: 100vh; overflow: hidden; }
.sidebar {
  --sidebar-w-expanded: 236px;
  --sidebar-w-collapsed: 64px;
  width: var(--sidebar-w-expanded);
  background-color: var(--sidebar-bg);
  background-image: var(--sidebar-bg-image);
  color: var(--sidebar-text);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  transition:
    width 0.32s cubic-bezier(0.32, 0.72, 0, 1),
    transform 0.2s ease,
    box-shadow 0.2s ease;
  z-index: 50;
  min-height: 0;
  height: 100vh;
  max-height: 100vh;
  overflow: hidden;
  box-shadow: var(--sidebar-shadow);
  border-right: 1px solid var(--sidebar-divider);
  will-change: width;
}
.sidebar-footer {
  flex: 0 0 auto;
  padding: 8px 10px 12px;
  border-top: 1px solid var(--sidebar-divider);
  transition: padding 0.28s cubic-bezier(0.32, 0.72, 0, 1);
}
.sidebar-collapse-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin: 0;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--sidebar-text-muted);
  font-size: 12px;
  line-height: 1.2;
  cursor: pointer;
  text-align: left;
  transition: background 0.18s, color 0.18s, border-color 0.18s, padding 0.28s, width 0.28s, justify-content 0.28s;
}
.sidebar-collapse-btn:hover {
  background: var(--sidebar-hover-bg);
  color: var(--sidebar-active-text);
}
.sidebar-collapse-icon {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--sidebar-divider);
  border-radius: 8px;
  color: inherit;
  transition: transform 0.32s cubic-bezier(0.32, 0.72, 0, 1), border-color 0.18s, background 0.18s;
}
.sidebar-collapse-icon svg { display: block; }
.sidebar-collapse-label {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  opacity: 1;
  max-width: 140px;
  transition: opacity 0.18s ease 0.06s, max-width 0.28s cubic-bezier(0.32, 0.72, 0, 1);
}
.sidebar.is-collapsed {
  width: var(--sidebar-w-collapsed);
  overflow: visible;
}
.sidebar.is-collapsed .logo {
  padding: 14px 0;
  display: flex;
  justify-content: center;
}
.sidebar.is-collapsed .logo-link {
  justify-content: center;
  gap: 0;
}
.sidebar.is-collapsed .logo-text,
.sidebar.is-collapsed .nav-label,
.sidebar.is-collapsed .sidebar-collapse-label {
  opacity: 0;
  max-width: 0;
  pointer-events: none;
  transition: opacity 0.12s ease, max-width 0.28s cubic-bezier(0.32, 0.72, 0, 1);
}
.sidebar.is-collapsed .sidebar-stats-scroll {
  opacity: 0;
  max-height: 0;
  padding: 0;
  margin: 0;
  overflow: hidden;
  pointer-events: none;
  border: 0;
  flex: 0 0 0;
  transition: opacity 0.16s ease, max-height 0.28s cubic-bezier(0.32, 0.72, 0, 1);
}
.sidebar.is-collapsed .side-nav {
  padding: 10px 8px 6px;
  overflow: visible;
}
.sidebar.is-collapsed .nav-item {
  justify-content: center;
  gap: 0;
  padding: 10px 0;
  margin: 3px 0;
  border-left-color: transparent;
  border-radius: 10px;
  min-height: 40px;
  position: relative;
}
.sidebar.is-collapsed .nav-item.active {
  background: var(--sidebar-active-bg);
  color: var(--sidebar-active-text);
  border-radius: 12px;
  margin-right: 0;
  width: 100%;
  box-shadow: none;
}
.sidebar.is-collapsed .nav-item.active::after {
  content: "";
  position: absolute;
  top: 8px;
  right: -1px;
  bottom: 8px;
  width: 3px;
  background: var(--sidebar-active-bar);
  border-radius: 2px 0 0 2px;
}
.sidebar.is-collapsed .sidebar-footer {
  padding: 8px 8px 14px;
  display: flex;
  justify-content: center;
  margin-top: auto;
}
.sidebar.is-collapsed .sidebar-collapse-btn {
  width: auto;
  padding: 4px;
  justify-content: center;
  gap: 0;
}
.sidebar.is-collapsed .sidebar-collapse-icon {
  transform: scaleX(-1);
  background: var(--sidebar-hover-bg);
  border-color: transparent;
}
.sidebar.is-collapsed .logo img {
  width: 30px;
  height: 30px;
  transition: width 0.28s ease, height 0.28s ease;
}
@media (prefers-reduced-motion: reduce) {
  .sidebar,
  .sidebar *,
  .nav-item,
  .nav-icon,
  .nav-label,
  .logo-text,
  .logo img,
  .sidebar-collapse-icon,
  .sidebar-collapse-label,
  .sidebar-stats-scroll {
    transition: none !important;
  }
}
.logo {
  flex: 0 0 auto;
  padding: 12px 14px;
  background: var(--sidebar-logo-bg);
  border-bottom: 1px solid var(--sidebar-logo-border);
}
.logo-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  border-radius: 8px;
  transition: opacity 0.15s;
}
.logo-link:hover { opacity: 0.92; }
.logo-text {
  text-align: left;
  min-width: 0;
  flex: 1;
  opacity: 1;
  max-width: 180px;
  overflow: hidden;
  transition: opacity 0.18s ease 0.06s, max-width 0.28s cubic-bezier(0.32, 0.72, 0, 1);
}
.logo-title {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--sidebar-logo-title);
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.02em;
}
.logo-sub {
  display: block;
  font-size: 11px;
  color: var(--sidebar-logo-sub);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}
.logo img {
  display: block;
  width: 36px;
  height: 36px;
  object-fit: contain;
  margin: 0;
  flex-shrink: 0;
  border-radius: 8px;
  transition: width 0.28s ease, height 0.28s ease;
}
.top-bar-brand {
  display: none;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #303133;
  flex-shrink: 0;
  max-width: 38%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.top-bar-brand img { flex-shrink: 0; border-radius: 4px; }
.mobile-stats-bar {
  display: none;
  padding: 6px 12px;
  background: var(--c-surface-soft);
  border-bottom: 1px solid var(--c-border-light);
  font-size: 12px;
  color: var(--c-text-secondary);
}
.mobile-stats-inner {
  display: flex;
  justify-content: flex-start;
  gap: 10px;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 2px;
}
.mobile-stats-inner span {
  white-space: nowrap;
}
.mobile-stats-inner b {
  color: var(--c-text);
  font-weight: 700;
  margin-left: 2px;
}
.login-brand {
  display: block;
  width: 72px;
  height: 72px;
  object-fit: contain;
  margin: 0 auto 10px;
}
.side-nav {
  flex: 0 0 auto;
  flex-shrink: 0;
  padding: 10px 8px 6px;
}
.sidebar-stats-scroll {
  flex: 1 1 0;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(100, 116, 139, 0.45) transparent;
  opacity: 1;
  max-height: 1000px;
  transition: opacity 0.2s ease 0.05s, max-height 0.32s cubic-bezier(0.32, 0.72, 0, 1);
}
.sidebar-stats-scroll::-webkit-scrollbar { width: 6px; }
.sidebar-stats-scroll::-webkit-scrollbar-thumb {
  background: rgba(100, 116, 139, 0.35);
  border-radius: 4px;
}
.sidebar-stats-scroll::-webkit-scrollbar-thumb:hover {
  background: rgba(100, 116, 139, 0.5);
}
html[data-theme="dark"] .sidebar-stats-scroll {
  scrollbar-color: rgba(255, 255, 255, 0.28) transparent;
}
html[data-theme="dark"] .sidebar-stats-scroll::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.22);
}
html[data-theme="dark"] .sidebar-stats-scroll::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.32);
}
.side-stats {
  flex: 0 0 auto;
  padding: 12px 14px 14px;
  border-top: 1px solid var(--sidebar-divider);
  background: transparent;
}
html:not([data-theme="dark"]) .side-stats {
  background: rgba(255, 255, 255, 0.72);
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 2px 0;
  padding: 10px 12px 10px 11px;
  color: var(--sidebar-text);
  text-decoration: none;
  border-left: 3px solid transparent;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.25;
  min-height: 42px;
  transition:
    background 0.18s ease,
    color 0.18s ease,
    border-color 0.18s ease,
    padding 0.28s cubic-bezier(0.32, 0.72, 0, 1),
    gap 0.28s ease,
    border-radius 0.2s ease;
}
.nav-icon {
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  opacity: 0.88;
  color: inherit;
  transition: opacity 0.18s, transform 0.18s, color 0.18s;
}
.nav-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  display: block;
}
.nav-label {
  white-space: nowrap;
  overflow: hidden;
  opacity: 1;
  max-width: 140px;
  transition: opacity 0.18s ease 0.06s, max-width 0.28s cubic-bezier(0.32, 0.72, 0, 1);
}
.nav-item:hover {
  background: var(--sidebar-hover-bg);
  color: var(--sidebar-active-text);
}
.nav-item:hover .nav-icon { opacity: 1; transform: scale(1.06); }
.nav-item.active {
  background: var(--sidebar-active-bg);
  color: var(--sidebar-active-text);
  border-left-color: var(--sidebar-active-bar);
  font-weight: 600;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.nav-item.active .nav-icon { opacity: 1; color: var(--sidebar-active-text); }
.nav-parent.expanded { color: var(--sidebar-active-text); }
.nav-sub { padding-left: 28px; }
.nav-sub a {
  display: block;
  padding: 6px 12px;
  color: var(--sidebar-text-muted);
  font-size: 12px;
  text-decoration: none;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
}
.nav-sub a:hover,
.nav-sub a.active {
  color: var(--sidebar-active-text);
  background: var(--sidebar-hover-bg);
}
.side-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 12px;
  margin-bottom: 4px;
}
.side-stat-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  padding: 4px 0;
}
.side-stat-label {
  font-size: 11px;
  color: var(--sidebar-stat-label);
  line-height: 1.2;
}
.side-stat-num {
  font-size: 17px;
  font-weight: 700;
  color: var(--sidebar-stat-num);
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.side-pending-ops .side-stat-num { color: #79bbff; }
.side-discovered-wrap .side-stat-num { color: #a8d8ff; }
.side-discovered-stale-wrap .side-stat-num { color: #f3d19e; }
.side-stale-wrap .side-stat-num { color: #f89898; }
.side-pending-ops { font-size: 11px; color: var(--sidebar-stat-label); }

.main-wrap { flex: 1; min-width: 0; display: flex; flex-direction: column; height: 100vh; overflow: hidden; }
.top-bar {
  height: 50px;
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-border);
  box-shadow: 0 1px 2px var(--c-shadow);
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 12px;
}
.menu-toggle { display: none; background: none; border: none; font-size: 20px; cursor: pointer; color: var(--c-text); }
.breadcrumb { flex: 1; font-size: 13px; color: var(--c-text-secondary); }
.top-right { display: flex; align-items: center; gap: 12px; font-size: 13px; min-width: 0; }
#userDisplay {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: inline-block;
  vertical-align: middle;
}
.top-toolbar { display: flex; align-items: center; gap: 4px; }
.top-toolbar-divider {
  width: 1px;
  height: 18px;
  background: var(--c-border);
  margin: 0 4px;
}
.top-tool-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--c-text-secondary);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.top-tool-btn:hover,
.top-tool-btn.active {
  background: var(--c-surface-soft);
  color: var(--c-primary);
}
.top-tool-icon {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.top-tool-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: #f56c6c;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
}
.top-tool-wrap { position: relative; }
.top-tool-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(320px, 92vw);
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: 8px;
  box-shadow: 0 8px 24px var(--c-shadow);
  z-index: 200;
  overflow: hidden;
}
.top-tool-dropdown-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-bottom: 1px solid var(--c-border);
  font-size: 13px;
}
.top-tool-dropdown-body {
  max-height: 360px;
  overflow-y: auto;
}
.notify-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border: none;
  border-bottom: 1px solid var(--c-border-light);
  background: transparent;
  color: var(--c-text);
  cursor: pointer;
  font-size: 13px;
  line-height: 1.45;
}
.notify-item:last-child { border-bottom: none; }
.notify-item:hover { background: var(--c-surface-soft); }
.notify-item.unread { background: rgba(64, 158, 255, 0.06); }
html[data-theme="dark"] .notify-item.unread { background: rgba(88, 166, 255, 0.1); }
.notify-item-title { font-weight: 600; margin-bottom: 2px; }
.notify-item-desc { color: var(--c-text-muted); font-size: 12px; }
.notify-empty {
  padding: 24px 12px;
  text-align: center;
  color: var(--c-text-muted);
  font-size: 13px;
}
.help-center-card {
  width: min(560px, 94vw);
  max-height: 85vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.help-center-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.help-center-body {
  overflow-y: auto;
  font-size: 13px;
  line-height: 1.55;
  color: var(--c-text-secondary);
}
.help-center-body section { margin-bottom: 16px; }
.help-center-body h4 {
  color: var(--c-text);
  font-size: 14px;
  margin-bottom: 6px;
}
.help-center-body ul { padding-left: 1.2em; }
.help-center-body li { margin-bottom: 4px; }
.user-top-profile {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}
.user-top-profile:hover #userDisplay { color: #409eff; }
.user-avatar-top {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  flex-shrink: 0;
  background: #e4e7ed center/cover no-repeat;
  color: #606266;
  font-size: 12px;
  font-weight: 600;
  line-height: 28px;
  text-align: center;
  overflow: hidden;
}
.user-avatar-top.has-photo { background-color: #ebeef5; }
.user-avatar-cell {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  background: #ebeef5;
  vertical-align: middle;
}
.user-avatar-placeholder {
  display: inline-block;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #e4e7ed;
  color: #909399;
  font-size: 13px;
  line-height: 32px;
  text-align: center;
  vertical-align: middle;
}
.profile-avatar-row {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
}
.profile-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  background: #ebeef5 center/cover no-repeat;
  flex-shrink: 0;
}
.profile-avatar.profile-avatar-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e4e7ed;
  color: #909399;
  font-size: 28px;
  font-weight: 600;
}
.profile-avatar-actions { flex: 1; min-width: 0; }
.profile-avatar-actions .btn { margin-right: 8px; margin-bottom: 6px; }
.btn-link { background: none; border: none; color: #409eff; cursor: pointer; text-decoration: none; }
a.btn-link:hover { text-decoration: underline; }

.main-content { flex: 1; min-height: 0; padding: 14px 16px; overflow: auto; }

/* 电脑端列表页：表格区域单独滚动，分页固定在底部 */
@media (min-width: 993px) {
  .main-content.main-data-scroll {
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  .main-content.main-data-scroll #page-data,
  .main-content.main-data-scroll #page-member-sea,
  .main-content.main-data-scroll #page-rank-tier {
    flex: 1 1 0%;
    min-height: 0;
    max-height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  .main-content.main-data-scroll #page-data > .toolbar-stack,
  .main-content.main-data-scroll #page-data > .worker-data-banner,
  .main-content.main-data-scroll #page-data > .streamer-lookup,
  .main-content.main-data-scroll #page-data > #guildRecheckBar,
  .main-content.main-data-scroll #page-rank-tier > .toolbar-stack,
  .main-content.main-data-scroll #page-rank-tier > .rank-import-meta,
  .main-content.main-data-scroll #page-rank-tier > #rankGuildJobBar,
  .main-content.main-data-scroll #page-rank-tier > #rankStreamerLookup,
  .main-content.main-data-scroll #page-member-sea > .member-toolbar-stack,
  .main-content.main-data-scroll #page-member-sea > #memberStreamerLookup,
  .main-content.main-data-scroll .pagination-bar {
    flex: 0 0 auto;
  }
  .main-content.main-data-scroll #page-data .table-wrap,
  .main-content.main-data-scroll #page-member-sea .member-table-wrap,
  .main-content.main-data-scroll #page-rank-tier .table-wrap {
    flex: 1 1 0%;
    min-height: 0;
    overflow: auto;
    border: 1px solid var(--c-border-light);
    border-radius: 4px;
    scrollbar-gutter: stable;
    /* 滚到底时最后几行不被裁切，方便勾选 */
    padding-bottom: 8px;
  }
  .main-content.main-data-scroll .pagination-bar {
    margin-top: 8px;
    padding-top: 10px;
    background: var(--c-surface);
    position: relative;
    z-index: 3;
  }
  .main-content.main-data-scroll .data-table th {
    z-index: 2;
  }
  .main-content.main-data-scroll .data-table th.col-_actions {
    z-index: 6;
  }
}
.page-section {
  background: var(--c-surface);
  border-radius: 8px;
  padding: 14px 16px;
  min-height: 0;
  border: 1px solid var(--c-border-light);
  box-shadow: 0 1px 2px var(--c-shadow);
  color: var(--c-text);
}

.pool-tabs { display: none; } /* 待查/排除 Tab 已下线 */
.pool-tab { display: none; }
.page-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 16px;
  margin: 0 0 10px;
}
.page-title {
  margin: 0;
  font-size: 18px;
  font-weight: 650;
  color: #303133;
  letter-spacing: 0.02em;
}
.page-title-hint {
  margin: 0;
  flex: 1 1 220px;
}
html[data-theme="dark"] .page-title { color: #e5eaf3; }
.worker-summary-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
}
.retention-card {
  max-width: 560px;
}
.toolbar-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0 0 10px;
}
.toolbar-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-height: 32px;
}
.toolbar-row-chips {
  gap: 8px 10px;
}
.toolbar-row-actions {
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--c-border-light, #ebeef5);
}
.toolbar-stack .filter-bar.simple {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}
html[data-theme="dark"] .toolbar-row-actions {
  border-top-color: var(--c-border);
}
html[data-theme="dark"] .toolbar-more-menu {
  background: #161b22;
  border-color: #30363d;
  box-shadow: 0 10px 28px rgb(0 0 0 / 45%);
}
html[data-theme="dark"] .btn:not(.primary):not(.danger) {
  background: #21262d;
  border-color: #30363d;
  color: #e6edf3;
}
html[data-theme="dark"] .btn:not(.primary):not(.danger):hover {
  border-color: #58a6ff;
  color: #58a6ff;
}
html[data-theme="dark"] .quick-filter {
  background: #21262d;
  border-color: #30363d;
  color: #c9d1d9;
}
html[data-theme="dark"] .quick-filter.active {
  background: #1f6feb;
  border-color: #1f6feb;
  color: #fff;
}
html[data-theme="dark"] .rank-cat-btn:not(.active) {
  background: #21262d;
  border-color: #30363d;
  color: #c9d1d9;
}
.quick-filters { display: flex; gap: 6px; margin: 0; flex-wrap: wrap; }
.toolbar-more {
  position: relative;
  margin-left: 2px;
}
.toolbar-more-btn {
  min-width: 72px;
}
.toolbar-batch .toolbar-more-btn.batch-idle {
  color: #409eff;
  border-color: #b3d8ff;
  background: transparent;
}
.toolbar-batch .toolbar-more-btn.batch-idle:hover {
  color: #66b1ff;
  border-color: #409eff;
  background: #ecf5ff;
}
html[data-theme="dark"] .toolbar-batch .toolbar-more-btn.batch-idle {
  color: #79bbff;
  border-color: #1e4a7a;
  background: transparent;
}
html[data-theme="dark"] .toolbar-batch .toolbar-more-btn.batch-idle:hover {
  color: #a0cfff;
  border-color: #58a6ff;
  background: #1f2a37;
}
.toolbar-more-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  z-index: 40;
  min-width: 168px;
  padding: 6px;
  border: 1px solid var(--c-border);
  border-radius: 8px;
  background: var(--c-surface);
  box-shadow: 0 8px 24px rgb(0 0 0 / 18%);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.toolbar-more-menu.hidden { display: none; }
.toolbar-more-item {
  width: 100%;
  height: 32px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--c-text);
  text-align: left;
  padding: 0 10px;
  font-size: 13px;
  cursor: pointer;
}
.toolbar-more-item:hover {
  background: #ecf5ff;
  color: #409eff;
}
.toolbar-more-item.toolbar-more-danger {
  color: #f56c6c;
}
.toolbar-more-item.toolbar-more-danger:hover {
  background: #fef0f0;
  color: #f56c6c;
}
html[data-theme="dark"] .toolbar-more-item.toolbar-more-danger:hover {
  background: #2a1515;
  color: #ff8a8a;
}
.filter-bar .filter-date-end {
  margin-left: auto;
}
.filter-bar .rank-date-sel.filter-date-end {
  width: auto;
  min-width: 132px;
}
.filter-bar-end {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex-shrink: 0;
}
.filter-bar-end .rank-date-sel {
  width: auto;
  min-width: 132px;
}
.filter-bar-end .toolbar-batch,
.filter-bar-end .btn-assign,
.filter-bar-end .btn-export,
.filter-bar-end .btn-rank-import {
  flex-shrink: 0;
}
.toolbar-more-block {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 6px 8px 8px;
  border-bottom: 1px solid var(--c-border-light);
  margin-bottom: 2px;
}
.toolbar-more-label {
  font-size: 11px;
  color: var(--c-text-muted);
}
.toolbar-more-block .rank-import-mode-sel {
  width: 100%;
  min-width: 0;
  height: 30px;
}
html[data-theme="dark"] .toolbar-more-item:hover {
  background: #1f2a37;
  color: #79bbff;
}

.rank-top-row {
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 10px;
}
.rank-top-row .rank-label-chips {
  flex: 1 1 240px;
  max-height: none;
  overflow: visible;
  flex-wrap: wrap;
}
.rank-coverage-inline {
  display: inline-flex;
  flex: 1 1 220px;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  width: auto;
  max-width: 100%;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  order: 0;
  overflow: visible;
}
.rank-coverage-inline[hidden] { display: none !important; }
.rank-coverage-inline .rank-cov-hint,
.rank-coverage-inline .rank-cov-date,
.rank-coverage-inline .rank-cov-total { display: none; }
.rank-coverage-inline .rank-cov-chip {
  min-height: 26px;
  padding: 2px 8px;
}
.rank-list-label-sel.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  pointer-events: none;
}
.rank-import-meta {
  margin: 0 0 8px;
  font-size: 12px;
}
.rank-import-meta.hidden { display: none; }

.member-toolbar-stack .member-batch-bar,
.toolbar-row#memberBatchBar {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}
.quick-filter {
  border: 1px solid var(--c-border);
  background: var(--c-surface);
  color: var(--c-text-secondary);
  border-radius: 4px;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
}
.quick-filter.active { background: #ecf5ff; border-color: #409eff; color: #409eff; }
.quick-filter:hover { border-color: #409eff; color: #409eff; }
.quick-filter-regular:not(.active) { color: #337ecc; border-color: #c6e2ff; background: #f0f7ff; }
.quick-filter-regular.active { background: #409eff; border-color: #409eff; color: #fff; }
.quick-filter-advanced:not(.active) { color: #b45309; border-color: #fcd34d; background: #fffbeb; }
.quick-filter-advanced.active { background: #e6a23c; border-color: #e6a23c; color: #fff; }
.live-tag-tip { border-bottom: 1px dotted #909399; cursor: help; }
.drp { position: relative; display: inline-flex; }
.drp-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  min-width: 240px;
  padding: 0 10px;
  border: 1px solid var(--c-border);
  border-radius: 4px;
  background: var(--c-surface);
  color: var(--c-text-secondary);
  font-size: 13px;
  cursor: pointer;
  text-align: left;
}
.drp-trigger:hover { border-color: #c0c4cc; }
.drp.is-open .drp-trigger,
.drp-trigger:focus { border-color: #409eff; outline: 0; }
.drp-trigger.has-value { color: var(--c-text); }
.drp-text { flex: 1; white-space: nowrap; }
.drp-clear {
  width: 16px;
  height: 16px;
  line-height: 14px;
  text-align: center;
  border-radius: 50%;
  color: #909399;
  font-size: 14px;
}
.drp-clear:hover { color: #606266; background: #f0f2f5; }
.date-range-icon {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  background: currentColor;
  opacity: .45;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M7 2h2v2h6V2h2v2h3a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h3V2zm13 8H4v10h16V10zM4 8h16V6H4v2z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M7 2h2v2h6V2h2v2h3a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h3V2zm13 8H4v10h16V10zM4 8h16V6H4v2z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.drp-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 1200;
  display: flex;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--c-border);
  border-radius: 6px;
  background: var(--c-surface);
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
}
.drp-panel::before {
  content: "";
  position: absolute;
  top: -6px;
  right: 28px;
  width: 10px;
  height: 10px;
  background: var(--c-surface);
  border-left: 1px solid var(--c-border);
  border-top: 1px solid var(--c-border);
  transform: rotate(45deg);
}
.drp-month { width: 252px; }
.drp-month-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--c-text);
}
.drp-month-nav { display: flex; gap: 2px; }
.drp-nav-btn {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #606266;
  cursor: pointer;
  font-size: 14px;
}
.drp-nav-btn:hover { background: #f2f6fc; color: #409eff; }
.drp-week {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  margin-bottom: 4px;
  color: #909399;
  font-size: 12px;
  text-align: center;
}
.drp-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px 0;
}
.drp-day {
  height: 30px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--c-text);
  font-size: 12px;
  cursor: pointer;
}
.drp-day:hover:not(:disabled):not(.is-start):not(.is-end) { color: #409eff; }
.drp-day:disabled { color: #c0c4cc; cursor: default; }
.drp-day.is-other { color: #c0c4cc; }
.drp-day.in-range { background: #f2f6fc; }
.drp-day.is-start,
.drp-day.is-end {
  background: #409eff;
  color: #fff;
  border-radius: 50%;
}
.drp-day.is-start.in-range { border-radius: 50% 0 0 50%; }
.drp-day.is-end.in-range { border-radius: 0 50% 50% 0; }
.drp-day.is-start.is-end { border-radius: 50%; }
.assign-summary { margin: 0 0 12px; color: var(--c-text-secondary); font-size: 13px; }
.assign-random-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 12px 0 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--c-text);
  cursor: pointer;
  user-select: none;
}
.assign-random-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
  cursor: pointer;
  accent-color: #409eff;
}
.assign-each-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--c-text);
}
.assign-each-row[hidden] { display: none !important; }
.assign-each-presets {
  display: inline-flex;
  gap: 6px;
}
.assign-preset {
  min-width: 48px;
  height: 30px;
  padding: 0 10px;
  border: 1px solid var(--c-border);
  border-radius: 4px;
  background: var(--c-surface);
  color: var(--c-text);
  font-size: 13px;
  cursor: pointer;
}
.assign-preset:hover { border-color: #409eff; color: #409eff; }
.assign-preset.active {
  border-color: #409eff;
  background: #ecf5ff;
  color: #409eff;
  font-weight: 700;
}
.assign-each-row input[type="number"] {
  width: 84px;
  height: 30px;
  padding: 0 8px;
  border: 1px solid var(--c-border);
  border-radius: 4px;
  background: var(--c-surface);
  color: var(--c-text);
  font-weight: 400;
}
.assign-preview { margin: 0 0 4px; min-height: 18px; }
html[data-theme="dark"] .assign-preset.active {
  background: rgba(64, 158, 255, 0.18);
  color: #79bbff;
}
.page-hint {
  font-size: 12px;
  color: var(--c-text-secondary);
  margin-bottom: 10px;
  line-height: 1.5;
  padding: 6px 10px;
  background: var(--c-surface-soft);
  border-radius: 6px;
  border-left: 3px solid var(--c-primary);
}
.hint-warn { color: #e6a23c; background: #fdf6ec; padding: 8px 10px; border-radius: 4px; margin-bottom: 10px; line-height: 1.5; }
.pool-tab-ops { opacity: .92; font-size: 12px; }
.pool-tab-ops.active { opacity: 1; }
.assign-region-hint { font-size: 12px; color: #909399; margin: 8px 0 12px; line-height: 1.6; }
.region-stats-title {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--sidebar-divider);
  font-size: 11px;
  color: var(--sidebar-stat-label);
  letter-spacing: 0.02em;
}
.region-stats-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 6px;
  overflow: hidden;
}
.region-stat-card {
  background: var(--sidebar-region-card-bg);
  border: 1px solid var(--sidebar-region-card-border);
  border-radius: 8px;
  padding: 8px 10px;
  min-width: 0;
  transition: border-color 0.15s, background 0.15s;
}
.region-stat-card:hover {
  border-color: rgba(64, 158, 255, 0.25);
}
.region-stat-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--sidebar-stat-num);
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.region-stat-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px 6px;
}
.region-stat-metric {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 2px;
}
.region-stat-label {
  font-size: 11px;
  color: var(--sidebar-stat-label);
  line-height: 1.2;
}
.region-stat-val {
  font-size: 16px;
  font-weight: 700;
  color: var(--sidebar-stat-num);
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
  letter-spacing: -0.02em;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.region-stat-metric.tone-unassigned .region-stat-val { color: #f3d19e; }
.region-stat-metric.tone-invitable .region-stat-val { color: #95d475; }
.region-stat-metric.tone-pending .region-stat-val { color: #79bbff; }
.region-stat-empty {
  font-size: 11px;
  color: #909399;
  padding: 4px 0;
}
.region-stat-row { display: flex; justify-content: space-between; gap: 6px; padding: 2px 0; }
.tag-region { background: #ecf5ff; color: #409eff; border: 1px solid #d9ecff; font-weight: 500; }
.tag-league { background: #f3e8ff; color: #7c3aed; border: 1px solid #e9d5ff; font-weight: 600; font-size: 12px; }
.lookup-gallery-gifts { margin-top: 8px; max-height: 180px; overflow-y: auto; font-size: 12px; color: var(--c-text-muted); }
.lookup-gallery-gift { padding: 2px 0; }

.data-toolbar {
  margin-bottom: 6px;
  padding-bottom: 0;
  border-bottom: none;
}
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  align-items: center;
}
.filter-bar.simple {
  gap: 8px;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid #f0f2f5;
}
#page-data .data-filter-row {
  margin-bottom: 0;
  padding-bottom: 0;
  flex-wrap: wrap;
  align-items: center;
}
.filter-bar-tail {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}
.btn-sm {
  height: 28px;
  padding: 0 10px;
  font-size: 12px;
}

.mobile-check-all { display: none; width: 20px; height: 20px; flex-shrink: 0; margin: 0; cursor: pointer; }
.filter-bar input,
.filter-bar select {
  height: 32px;
  border: 1px solid var(--c-border);
  border-radius: 6px;
  padding: 0 10px;
  font-size: 13px;
  background: var(--c-surface);
  color: var(--c-text);
  transition: border-color .15s;
}
.filter-bar input:focus,
.filter-bar select:focus {
  outline: none;
  border-color: #409eff;
}
.filter-bar .region-sel { width: 108px; }
.filter-bar .assignee-sel { width: 148px; max-width: 200px; }
.filter-bar .rank-sort-preset { width: 104px; }
.filter-bar .search-q {
  width: 168px;
  flex: 0 0 168px;
  max-width: 168px;
}
.filter-search-row {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}
.filter-search-row .search-q {
  width: 168px;
  flex: 0 0 168px;
  max-width: 168px;
}
.filter-search-row .btn {
  flex-shrink: 0;
  white-space: nowrap;
}
.chk-unassigned {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: var(--c-text-secondary, #606266);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  height: 32px;
}
.chk-unassigned input {
  width: 15px;
  height: 15px;
  margin: 0;
  cursor: pointer;
  accent-color: #409eff;
}

.btn {
  height: 32px;
  padding: 0 14px;
  border: 1px solid var(--c-border);
  background: var(--c-surface);
  color: var(--c-text);
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  transition: border-color .15s, background .15s, color .15s;
}
.btn:hover { border-color: #c6e2ff; }
.btn.primary { background: #409eff; border-color: #409eff; color: #fff; }
.btn.primary:hover { background: #66b1ff; border-color: #66b1ff; }
.btn.danger { color: #f56c6c; border-color: #fbc4c4; background: #fef0f0; }
.btn.danger:hover { border-color: #f56c6c; }
.btn.full { width: 100%; height: 40px; }

.table-wrap { overflow: auto; }
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  table-layout: auto;
}
.data-table th, .data-table td {
  border-bottom: 1px solid var(--c-border-light);
  padding: 9px 10px;
  text-align: left;
  white-space: nowrap;
  color: var(--c-text);
}
.data-table th { background: var(--c-surface-soft); color: var(--c-text-muted); font-weight: 500; position: sticky; top: 0; }
.data-table .col-_sel,
.data-table .col-sel {
  width: 40px;
  min-width: 40px;
  max-width: 44px;
  padding-left: 10px;
  padding-right: 4px;
}
.data-table .col-tiktok_handle {
  width: 26%;
  min-width: 168px;
}
.data-table .col-contact_status { min-width: 52px; }
.data-table .col-region_detail { min-width: 64px; }
.data-table .col-capture_source { min-width: 56px; }
.data-table .col-anchor_ranking_league { min-width: 52px; }
.data-table .col-diamonds,
.data-table .col-score {
  min-width: 96px;
  font-variant-numeric: tabular-nums;
}
.data-table .col-created_at,
.data-table .col-updated_at,
.data-table .col-data_date {
  min-width: 148px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
.data-table .col-guild_status { min-width: 120px; }
.data-table .col-list_label { min-width: 72px; }
.data-table .col-rank_num { min-width: 52px; }

/* 仅在较窄时藏次要列；宽屏铺满，避免右侧大片空白 */
@media (max-width: 1180px) {
  .data-table .col-live_category,
  .data-table .col-followers,
  .data-table .col-online,
  .data-table .col-invite_type,
  .data-table .col-crawl_region {
    display: none;
  }
}
@media (max-width: 980px) {
  .data-table .col-capture_source,
  .data-table .col-assigned_to,
  .data-table .col-anchor_ranking_league {
    display: none;
  }
}
.th-operate {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  vertical-align: middle;
}
.th-sorter {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  cursor: pointer;
  border-radius: 4px;
}
.th-sorter:hover .th-head-label { color: #36cfc9; }
.th-head-title {
  display: inline-flex;
  align-items: center;
  min-width: 0;
}
.th-title-inner {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  line-height: 1.35;
}
.th-head-label {
  min-width: 0;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  word-break: break-word;
}
.th-sort-icons {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  flex-shrink: 0;
  line-height: 0;
}
.th-sort-btn + .th-sort-btn { margin-top: -3px; }
.th-hint-btn,
.th-filter-btn,
.th-sort-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  color: #8b919a;
  line-height: 0;
  flex-shrink: 0;
}
.th-hint-btn:hover,
.th-filter-btn:hover,
.th-sort-btn:hover { color: #36cfc9; }
.th-filter-btn.active,
.th-sort-btn.active { color: #36cfc9; }
.th-icon {
  display: block;
  width: 14px;
  height: 14px;
}
.th-icon-sort {
  width: 11px;
  height: 11px;
}
.th-icon-filter {
  width: 14px;
  height: 14px;
}
.th-icon-info {
  width: 13px;
  height: 13px;
}
.data-table th .th-operate { width: 100%; }
.data-table td.col-_actions {
  position: sticky;
  right: 0;
  z-index: 1;
  min-width: 148px;
  background: var(--c-surface);
  box-shadow: -4px 0 8px rgba(0, 0, 0, 0.06);
}
.data-table th.col-_actions {
  position: sticky;
  top: 0;
  right: 0;
  z-index: 5;
  min-width: 148px;
  background: var(--c-surface-soft);
  box-shadow: -4px 0 8px rgba(0, 0, 0, 0.06);
}
.data-table tbody tr:hover td.col-_actions {
  background: var(--c-surface-soft);
}
.card-ops-wrap { margin-top: 8px; }
.row-ops {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
}
.row-ops-compact { gap: 8px; }
.row-op-btn {
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 13px;
  line-height: 1.3;
  padding: 0;
  white-space: nowrap;
}
.row-op-primary { color: #36cfc9; }
.row-op-change { color: #8b919a; }
.row-op-more {
  color: #36cfc9;
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
  min-width: 18px;
}
.row-op-btn:hover { opacity: 0.85; }
.row-ops-menu {
  position: fixed;
  z-index: 10001;
  min-width: 132px;
  padding: 4px 0;
  background: #2b2f36;
  border: 1px solid #3d4450;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}
.row-ops-menu.hidden { display: none; }
.row-ops-menu-item {
  display: block;
  width: 100%;
  border: none;
  background: transparent;
  color: #e8eaed;
  font-size: 13px;
  text-align: left;
  padding: 8px 14px;
  cursor: pointer;
}
.row-ops-menu-item:hover { background: rgba(255, 255, 255, 0.06); color: #36cfc9; }
html[data-theme="dark"] .data-table th.col-_actions,
html[data-theme="dark"] .data-table td.col-_actions {
  background: var(--c-surface-soft);
}
html[data-theme="dark"] .data-table tbody tr:hover td.col-_actions {
  background: #2a2e35;
}
.data-table tr:hover td { background: var(--c-surface-soft); }
.handle-cell { display: inline-flex; flex-wrap: nowrap; align-items: center; gap: 8px; max-width: 100%; }
.handle-with-avatar {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  max-width: 100%;
}
.handle-avatar-wrap {
  position: relative;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
}
.handle-avatar,
.handle-avatar-ph {
  display: block;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  background: #e4e7ed;
}
.handle-avatar-ph {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  color: #606266;
  line-height: 1;
}
.handle-avatar-share {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #409eff;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 2px var(--c-surface, #fff);
  text-decoration: none;
  z-index: 1;
}
.handle-avatar-share svg {
  width: 10px;
  height: 10px;
  display: block;
}
.handle-avatar-share:hover {
  background: #66b1ff;
  color: #fff;
}
.handle-id-copy {
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
  min-width: 0;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #409eff;
  font: inherit;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  line-height: 1.3;
}
.handle-id-copy:hover {
  text-decoration: underline;
  color: #66b1ff;
}
.handle-id-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-width: 0;
  flex: 1 1 auto;
}
.handle-nick-under {
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  line-height: 1.2;
  color: #909399;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
}
.handle-nick-under:hover {
  color: #409eff;
}
.handle-cell-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 8px;
  width: 100%;
  min-height: 22px;
}
.handle-main {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  overflow: hidden;
}
.handle-cell .handle-link {
  flex-shrink: 0;
  color: #409eff;
  text-decoration: none;
  font-weight: 500;
  line-height: 22px;
}
.handle-cell .handle-link:hover { text-decoration: underline; }
.handle-nick {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  color: #606266;
  line-height: 22px;
}
.handle-cell .btn-copy-one:not(.handle-id-copy),
.handle-cell-row .btn-copy-one:not(.handle-id-copy) {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  height: 22px;
  padding: 0 6px;
  margin: 0;
  font-size: 12px;
  line-height: 1;
  color: #409eff;
  white-space: nowrap;
}
.data-table td { vertical-align: middle; }
.data-table td:has(.handle-with-avatar) {
  min-width: 168px;
}
.data-table td.col-tiktok_handle .handle-with-avatar {
  width: 100%;
  max-width: none;
}
.data-table td.col-tiktok_handle .handle-main {
  flex: 1 1 auto;
  min-width: 0;
}
.member-card-avatar-wrap {
  position: relative;
  flex-shrink: 0;
  width: 48px;
  height: 48px;
}
.member-card-avatar-wrap .member-card-avatar,
.member-card-avatar-wrap .card-ph.member-card-avatar {
  width: 48px;
  height: 48px;
}
.member-card-avatar-wrap .handle-avatar-share {
  width: 18px;
  height: 18px;
}
.member-card-avatar-wrap .handle-avatar-share svg {
  width: 11px;
  height: 11px;
}
.member-card .card-handle.handle-id-copy {
  color: #409eff;
  font-weight: 500;
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  font: inherit;
}
.member-card .card-handle.handle-id-copy:hover {
  text-decoration: underline;
}
html[data-theme="dark"] .handle-avatar-ph {
  background: #30363d;
  color: #c9d1d9;
}
html[data-theme="dark"] .handle-avatar-share {
  box-shadow: 0 0 0 2px var(--c-surface, #161b22);
}
html[data-theme="dark"] .handle-id-copy {
  color: #79bbff;
}
html[data-theme="dark"] .handle-id-copy:hover {
  color: #a0cfff;
}
html[data-theme="dark"] .handle-nick-under {
  color: #8b949e;
}
html[data-theme="dark"] .handle-nick-under:hover {
  color: #79bbff;
}
.member-table th:nth-child(2),
.member-table td:nth-child(2) { min-width: 168px; vertical-align: middle; }
.member-handle-cell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 8px;
  width: 100%;
  min-height: 22px;
}
.member-handle-cell .member-handle-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
  color: var(--c-text);
  cursor: default;
  user-select: text;
  line-height: 22px;
}
.member-handle-cell .member-id-copy { cursor: pointer; }
.member-handle-cell .btn-copy-one {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  height: 22px;
  padding: 0 6px;
  margin: 0;
  line-height: 1;
  white-space: nowrap;
}
.contact-yes { color: #67c23a; }
.contact-no { color: #909399; }
.avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.avatar-ph, .card-ph { width: 36px; height: 36px; border-radius: 50%; background: #e4e7ed; display: inline-block; }

.tag { display: inline-block; padding: 2px 8px; border-radius: 3px; font-size: 12px; }
.tag-ok { background: #f0f9eb; color: #67c23a; border: 1px solid #e1f3d8; }
.tag-warn { background: #fdf6ec; color: #e6a23c; border: 1px solid #faecd8; }
.tag-gray { background: #f4f4f5; color: #909399; }
.tag-invite-regular { background: #ecf5ff; color: #409eff; border: 1px solid #d9ecff; font-weight: 500; }
.tag-invite-advanced { background: #fdf6ec; color: #e6a23c; border: 1px solid #faecd8; font-weight: 500; }
.tag-invite-other { background: #f4f4f5; color: #909399; border: 1px solid #e4e7ed; }
.tag-live-mic { background: #f0f9eb; color: #67c23a; border: 1px solid #e1f3d8; font-weight: 500; }
.tag-live-pk { background: #fef0f0; color: #f56c6c; border: 1px solid #fde2e2; font-weight: 500; }

.ingest-health-card {
  margin: 0 0 10px;
  padding: 0;
  border: 1px solid #e4e7ed;
  border-radius: 8px;
  background: #fafbfc;
  overflow: hidden;
}
.ingest-health-summary {
  cursor: pointer;
  list-style: none;
  padding: 8px 12px;
  font-size: 13px;
  color: #606266;
  user-select: none;
}
.ingest-health-summary::-webkit-details-marker { display: none; }
.ingest-health-summary b { color: #409eff; font-variant-numeric: tabular-nums; }
.ingest-health-card[open] .ingest-health-summary {
  border-bottom: 1px solid var(--c-border, #e4e7ed);
}
.ingest-health-card .ingest-dead-hint,
.ingest-health-card .ingest-health-row,
.ingest-health-card .ingest-health-actions,
.ingest-health-card .ingest-dead-wrap {
  margin-left: 12px;
  margin-right: 12px;
}
.ingest-health-card .ingest-dead-hint { margin-top: 8px; }
.ingest-health-card .ingest-dead-wrap { margin-bottom: 10px; }
.ingest-health-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 22px;
  align-items: baseline;
  font-size: 13px;
  color: #606266;
  margin: 8px 12px;
}
.ingest-health-row b { color: #409eff; font-variant-numeric: tabular-nums; }
.ingest-health-error { color: #f56c6c; max-width: 100%; }
.ingest-health-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 12px; }
.ingest-dead-wrap { max-height: 260px; overflow: auto; }
html[data-theme="dark"] .ingest-health-card {
  border-color: #30363d;
  background: #161b22;
}
html[data-theme="dark"] .ingest-health-summary { color: #8b949e; }
html[data-theme="dark"] .ingest-health-summary b { color: #58a6ff; }
html[data-theme="dark"] .ingest-health-row { color: #8b949e; }
html[data-theme="dark"] .ingest-health-row b { color: #58a6ff; }

.worker-summary-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
}
.worker-summary-bar span { font-size: 13px; color: #606266; }
.worker-summary-bar b { color: #409eff; font-size: 15px; font-variant-numeric: tabular-nums; }
.wk-offline-stat b { color: #f56c6c; }
.workers-toolbar-stack .worker-filter-tabs { margin: 0; }
.worker-filter-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.worker-filter-tabs .wk-filter { font-size: 13px; padding: 4px 12px; }
.worker-filter-tabs .wk-filter.active { background: #409eff; color: #fff; border-color: #409eff; }
.worker-cards { display: none; gap: 10px; flex-direction: column; }
.worker-card {
  display: flex; gap: 10px; padding: 12px; background: var(--c-surface);
  border-radius: 8px; border: 1px solid var(--c-border-light);
}
.worker-card.offline { opacity: 0.85; border-color: #fde2e2; }
.worker-card.stale { border-color: #fbc4c4; background: #fef0f0; }
.worker-card .wc-title { font-weight: bold; font-size: 15px; }
.worker-card .wc-meta { font-size: 12px; color: var(--c-text-secondary); margin-top: 4px; }
.data-table tr.row-offline td { color: #909399; }
.data-table tr.row-stale td { background: #fef0f0; }
.data-table tr.row-stale td:first-child { border-left: 3px solid #f56c6c; }

.worker-data-banner {
  margin: 0 0 10px;
  padding: 8px 12px;
  background: #ecf5ff;
  border: 1px solid #b3d8ff;
  border-radius: 6px;
  font-size: 13px;
  color: #409eff;
}
.worker-region-groups {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
}
.wk-region-chip {
  padding: 6px 12px;
  background: var(--c-surface-soft);
  border: 1px solid var(--c-border-light);
  border-radius: 6px;
  font-size: 13px;
  color: var(--c-text);
}
.wk-region-name { font-weight: 600; margin-right: 8px; }
.wk-region-meta { color: #909399; font-size: 12px; }
.wk-stale-stat b, .side-stale-wrap b { color: #f56c6c; }
.side-stale-wrap { font-size: 13px; color: #909399; margin-top: 4px; }

.wk-actions { white-space: nowrap; }
.wk-actions .btn-sm {
  height: 26px;
  padding: 0 8px;
  font-size: 12px;
  margin-right: 4px;
}
.wk-log-cell {
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  color: #606266;
}

.filter-right { position: relative; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-left: auto; }
.btn-more-toggle { display: none; }
.admin-more-panel { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }

@media (max-width: 768px) {
  html.has-token body { overflow: auto; }
  .app-shell { height: auto; min-height: 100vh; overflow: visible; }
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 236px !important;
    transform: translateX(-100%);
    height: 100vh;
    max-height: 100vh;
    box-shadow: none;
    overflow: hidden !important;
  }
  .sidebar.open { transform: translateX(0); box-shadow: var(--sidebar-shadow); }
  /* 手机抽屉始终显示文案，忽略桌面收起态 */
  .sidebar .logo {
    padding: 12px 14px;
    display: block;
  }
  .sidebar .logo-link { justify-content: flex-start; gap: 10px; }
  .sidebar .logo-text,
  .sidebar .nav-label,
  .sidebar .sidebar-collapse-label {
    display: block !important;
    opacity: 1 !important;
    max-width: 180px !important;
    pointer-events: auto !important;
  }
  .sidebar.is-collapsed .sidebar-stats-scroll {
    display: none !important;
    opacity: 0 !important;
    max-height: 0 !important;
  }
  .sidebar .nav-item {
    justify-content: flex-start !important;
    gap: 10px !important;
    padding: 10px 12px 10px 11px !important;
    width: auto !important;
    margin: 2px 0 !important;
    border-radius: 8px !important;
  }
  .sidebar .nav-item.active {
    width: auto !important;
    margin-right: 0 !important;
    border-radius: 8px !important;
  }
  .sidebar .nav-item.active::after { display: none !important; }
  .sidebar .logo img { width: 36px !important; height: 36px !important; }
  .desktop-only-sidebar { display: none !important; }
  .main-wrap { height: auto; min-height: 100vh; overflow: visible; }
  .main-content { overflow: visible; padding: 6px 8px; padding-bottom: max(8px, env(safe-area-inset-bottom)); }
  .page-section { padding: 8px; border-radius: 6px; }
  #page-member-sea.page-section { padding: 6px 8px; }
  .top-bar { position: sticky; top: 0; z-index: 45; padding: 0 12px; }
  .menu-toggle { display: block; position: relative; z-index: 46; }
  .top-bar-brand.mobile-only { display: flex; }
  .mobile-stats-bar.mobile-only { display: block; }
  .sidebar-stats-scroll { display: none; }
  .side-stats { display: none; }
  .breadcrumb { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
  .top-right { font-size: 12px; gap: 8px; flex-shrink: 0; }
  .filter-bar { gap: 8px; }
  .filter-bar-tail {
    width: 100%;
    margin-left: 0;
    justify-content: space-between;
  }
  .filter-bar-tail .filter-right { margin-left: 0; flex: 1 1 auto; justify-content: flex-end; }
  .mobile-check-all { display: inline-block; }
  .member-batch-bar .mobile-check-all { display: inline-block; }
  #page-data .table-head #checkAll { display: none; }
  .filter-bar .search-q { width: auto; min-width: 0; flex: 1 1 auto; max-width: none; }
  .filter-search-row {
    width: 100%;
    flex: 1 1 100%;
    display: flex;
  }
  .filter-search-row .search-q {
    flex: 1 1 auto;
    width: auto;
    max-width: none;
  }
  .filter-search-row .btn {
    width: auto;
    max-width: none;
  }
  .filter-bar input, .filter-bar select, .filter-bar > .btn { max-width: 100%; }
  .quick-filters {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 8px;
  }
  .quick-filter {
    width: 100%;
    text-align: center;
    padding: 8px 6px;
    font-size: 13px;
  }
  .member-filter { flex-direction: column; align-items: stretch; }
  .member-filter .region-sel { width: 100%; }
  .member-filter .filter-search-row { width: 100%; }
  #page-member-sea.member-status-following .btn-member-batch-contact { display: none !important; }
  /* 组员手机端：压缩筛选区，多露出列表 */
  #page-member-sea .member-toolbar-row {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
  }
  #page-member-sea .member-status-tabs {
    flex: 1 1 auto;
    display: flex;
    flex-wrap: nowrap;
    gap: 4px;
    margin-bottom: 0;
    min-width: 0;
  }
  #page-member-sea .m-status {
    flex: 1 1 0;
    min-width: 0;
    height: 26px;
    padding: 0 4px;
    font-size: 11px;
  }
  #page-member-sea .member-quick-filters {
    display: inline-flex !important;
    flex: 0 0 auto;
    flex-wrap: nowrap;
    gap: 0;
    margin: 0 !important;
    padding: 1px;
    width: auto !important;
    border: 1px solid var(--c-border, #dcdfe6);
    border-radius: 6px;
    background: var(--c-surface-soft, #f5f7fa);
  }
  #page-member-sea .member-quick-filters .member-qf {
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: 0;
    height: 22px;
    padding: 0 7px !important;
    margin: 0;
    border: none !important;
    border-radius: 4px;
    background: transparent;
    box-shadow: none;
    font-size: 11px;
    line-height: 22px;
    white-space: nowrap;
    color: var(--c-text-secondary, #606266);
    cursor: pointer;
  }
  #page-member-sea .member-quick-filters .member-qf.active {
    background: #409eff !important;
    color: #fff !important;
  }
  #page-member-sea .member-filter {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    margin-bottom: 4px;
    padding: 0;
    border: none;
  }
  #page-member-sea .member-filter .mobile-sort-sel,
  #page-member-sea .member-filter .region-sel {
    width: 100%;
    max-width: none;
    height: 30px;
    font-size: 12px;
    margin: 0;
  }
  #page-member-sea .member-filter .filter-search-row {
    grid-column: 1 / -1;
    width: 100%;
    gap: 4px;
    margin: 0;
  }
  #page-member-sea .member-filter .filter-search-row .search-q {
    height: 30px;
    font-size: 13px;
  }
  #page-member-sea .member-filter .filter-search-row .btn {
    height: 30px;
    padding: 0 8px;
    font-size: 12px;
    flex-shrink: 0;
  }
  #page-member-sea .member-batch-bar {
    position: sticky;
    top: 44px;
    z-index: 40;
    gap: 6px;
    margin-bottom: 6px;
    padding: 4px 6px;
    font-size: 12px;
    background: rgba(245, 247, 250, 0.96);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
  }
  #page-member-sea .member-batch-bar .btn {
    height: 28px;
    padding: 0 8px;
    font-size: 12px;
  }
  #page-member-sea .member-sel-label { white-space: nowrap; }
  /* 组员主播卡片：更扁，一屏多看几条 */
  #page-member-sea .member-cards { gap: 4px; }
  #page-member-sea .member-card {
    gap: 6px;
    padding: 6px 8px;
    border-radius: 6px;
    align-items: center;
  }
  #page-member-sea .member-card img.member-card-avatar,
  #page-member-sea .member-card .card-ph.member-card-avatar {
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
  }
  #page-member-sea .member-avatar-initial { font-size: 13px; }
  #page-member-sea .member-card-check-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
    min-width: 22px;
    min-height: 22px;
  }
  #page-member-sea .member-card-check {
    width: 16px;
    height: 16px;
    margin-top: 0;
  }
  #page-member-sea .card-handle-row {
    gap: 4px;
    margin-bottom: 0;
    align-items: center;
  }
  #page-member-sea .card-title-block {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: row;
    align-items: baseline;
    gap: 4px;
    line-height: 1.25;
  }
  #page-member-sea .card-handle {
    flex: 0 1 auto;
    max-width: 55%;
    font-size: 13px;
    line-height: 1.25;
  }
  #page-member-sea .card-title-sep {
    flex-shrink: 0;
    color: #c0c4cc;
    font-size: 12px;
  }
  #page-member-sea .card-nick-inline {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 12px;
    font-weight: 500;
    color: #909399;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  #page-member-sea .card-handle-row .btn-link,
  #page-member-sea .card-handle-row .btn-copy-one {
    font-size: 12px;
    padding: 2px 4px;
    min-height: 24px;
  }
  #page-member-sea .card-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    margin-top: 2px;
  }
  #page-member-sea .m-chip {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 1px 5px;
    border-radius: 3px;
    background: #f0f2f5;
    color: #606266;
    font-size: 10px;
    line-height: 1.25;
    font-weight: 500;
  }
  #page-member-sea .m-chip-coin {
    background: #ecf5ff;
    color: #409eff;
  }
  #page-member-sea .m-chip-coin .coin-diamond-icon {
    font-size: 11px;
    color: #e6a23c;
  }
  #page-member-sea .m-chip-rank {
    background: #f3e8ff;
    color: #7c3aed;
    font-weight: 700;
  }
  #page-member-sea .card-meta-tags {
    gap: 3px;
    margin-top: 3px;
  }
  #page-member-sea .card-meta-tags .tag {
    font-size: 10px;
    padding: 0 5px;
  }
  #page-member-sea .card-meta {
    font-size: 10px;
    margin-top: 1px;
    line-height: 1.3;
  }
  #page-member-sea .card-meta-line {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .mobile-stats-bar {
    padding: 4px 10px;
  }
  .mobile-stats-inner {
    font-size: 11px;
    gap: 4px 8px;
  }
  .filter-right { width: 100%; margin-left: 0; justify-content: flex-end; }
  .btn-more-toggle { display: inline-block; }
  .admin-more-panel {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 4px;
    z-index: 60;
    background: #fff;
    border: 1px solid #dcdfe6;
    border-radius: 6px;
    padding: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,.12);
    flex-direction: column;
    align-items: stretch;
    min-width: 140px;
  }
  .admin-more-panel.open { display: flex; }
  .admin-more-panel .btn { width: 100%; margin: 2px 0; }
  .data-table { font-size: 12px; }
  .member-table-wrap,
  .worker-table-wrap,
  #page-data .table-wrap,
  #page-rank-tier .table-wrap,
  #page-follow .table-wrap,
  #page-team .table-wrap { display: none !important; }
  .mobile-only { display: block !important; }
  #page-member-sea .member-filter .mobile-sort-sel.mobile-only { display: block !important; }
  .hide-on-mobile { display: none !important; }
  .member-cards,
  .data-cards.mobile-only,
  .rank-cards.mobile-only,
  .follow-cards.mobile-only,
  .team-cards.mobile-only,
  .worker-cards.mobile-only { display: flex !important; }
  .mobile-toolbar { display: flex; gap: 8px; margin: 0 0 10px; align-items: center; }
  .mobile-toolbar .mobile-sort-sel { flex: 1; min-width: 0; height: 36px; font-size: 13px; }
  .worker-summary-bar {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px 8px;
    font-size: 12px;
  }
  .worker-summary-bar .btn { grid-column: 1 / -1; width: 100%; margin-top: 4px; }
  .worker-filter-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
  .worker-filter-tabs .wk-filter { flex: 1 1 calc(33% - 6px); min-width: 0; font-size: 12px; padding: 0 6px; }
  .mobile-stats-inner { flex-wrap: wrap; gap: 6px 10px; font-size: 11px; }
  #userDisplay { max-width: 56px; }
  .pagination-bar { flex-wrap: wrap; justify-content: center; }
  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .streamer-lookup:not(.hidden) > .lookup-card:not(.lookup-card-loading):not(.lookup-card-notfound) {
    height: min(70vh, 640px);
    max-height: min(70vh, 640px);
  }
  .lookup-detail-split { flex-direction: column; gap: 10px; overflow: visible; flex: none; }
  .lookup-col-main,
  .lookup-col-ops {
    overflow: visible;
    max-width: none;
    min-width: 0;
  }
  .lookup-col-ops {
    flex: 1 1 auto;
    padding-left: 0;
    border-left: none;
    border-top: 1px solid #ebeef5;
    padding-top: 10px;
  }
  .lookup-section-ops { border-top: none; padding-top: 0; }
  .lookup-section-sessions { max-height: none; }
  .streamer-lookup:not(.hidden) > .lookup-card:not(.lookup-card-loading):not(.lookup-card-notfound) .lookup-info {
    overflow-y: auto;
  }
}
.tag-danger { background: #fef0f0; color: #f56c6c; }

.pagination-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 12px;
  padding-top: 12px;
  margin-top: 4px;
  border-top: 1px solid var(--c-border-light);
  color: var(--c-text);
}
.pagination-bar .total-text {
  color: var(--c-text-secondary);
  font-size: 13px;
  white-space: nowrap;
  order: 0;
}
.pagination-bar .page-size-sel {
  width: auto;
  min-width: 96px;
  height: 32px;
  padding: 0 28px 0 10px;
  font-size: 13px;
  border: 1px solid var(--c-border);
  border-radius: 4px;
  background: var(--c-surface);
  color: var(--c-text);
}
.pagination-bar .page-size-sel:focus {
  border-color: #409eff;
  outline: none;
}
.pagination-nav {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.page-nums {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  min-height: 32px;
}
.btn-page-nav,
.btn.btn-page-num,
.btn-page-num {
  width: auto;
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border: 1px solid var(--c-border);
  background: var(--c-surface);
  border-radius: 4px;
  font-size: 13px;
  line-height: 1;
  color: var(--c-text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}
.btn-page-nav {
  width: 32px;
  font-size: 18px;
  color: var(--c-text-secondary);
}
.btn-page-nav:hover:not(:disabled),
.btn-page-num:hover:not(.active) {
  border-color: #409eff;
  color: #409eff;
}
.btn-page-nav:disabled {
  color: #c0c4cc;
  border-color: #ebeef5;
  background: #f5f7fa;
  cursor: not-allowed;
}
.btn-page-num.active,
.btn.btn-page-num.active {
  background: #409eff !important;
  border-color: #409eff !important;
  color: #fff !important;
  font-weight: 500;
}
.page-ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  color: var(--c-text-secondary);
  letter-spacing: 1px;
  user-select: none;
}
.page-jumper {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--c-text-secondary);
  white-space: nowrap;
  margin-left: 4px;
}
.page-jump-input {
  width: 48px;
  height: 32px;
  padding: 0 6px;
  border: 1px solid var(--c-border);
  border-radius: 4px;
  text-align: center;
  font-size: 13px;
  background: var(--c-surface);
  color: var(--c-text);
  box-sizing: border-box;
}
.page-jump-input:focus {
  border-color: #409eff;
  outline: none;
}
html[data-theme="dark"] .btn-page-nav:disabled {
  background: #2a2e39;
  border-color: #3a3f4b;
  color: #6b7280;
}
html[data-theme="dark"] .btn-page-num.active {
  background: #409eff;
  border-color: #409eff;
  color: #fff;
}
.follow-total-row td { background: #f5f7fa; font-weight: 500; }
.empty { text-align: center; color: #909399; padding: 24px; }

.streamer-lookup { margin-bottom: 12px; position: relative; }
.streamer-lookup .lookup-card { user-select: text; cursor: text; position: relative; }
.lookup-card { display: flex; gap: 14px; align-items: flex-start; padding: 12px 14px 12px 14px; background: #f5f7fa; border: 1px solid #ebeef5; border-radius: 6px; }
/* 详情固定高度：内容少不拉高列表，内容多在框内滚完 */
.streamer-lookup:not(.hidden) > .lookup-card:not(.lookup-card-loading):not(.lookup-card-notfound) {
  height: min(48vh, 540px);
  max-height: min(48vh, 540px);
  align-items: stretch;
  overflow: hidden;
}
.streamer-lookup:not(.hidden) > .lookup-card:not(.lookup-card-loading):not(.lookup-card-notfound) > .lookup-avatar,
.streamer-lookup:not(.hidden) > .lookup-card:not(.lookup-card-loading):not(.lookup-card-notfound) > .lookup-avatar-ph {
  align-self: flex-start;
}
.lookup-detail-split {
  display: flex;
  gap: 16px;
  align-items: stretch;
  margin-top: 4px;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}
.lookup-col-main {
  flex: 1 1 56%;
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
}
.lookup-col-social {
  flex: 1 1 50%;
  min-width: 0;
}
.lookup-col-ops {
  flex: 0 1 40%;
  min-width: 220px;
  max-width: 420px;
  min-height: 0;
  padding-left: 14px;
  border-left: 1px solid #ebeef5;
  overflow-y: auto;
}
.lookup-section-social,
.lookup-section-ops { margin-top: 10px; padding-top: 8px; border-top: 1px dashed #e4e7ed; }
.lookup-col-main > .lookup-section:first-child,
.lookup-col-ops > .lookup-section-ops {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}
.lookup-section-ops { margin-top: 0; }
.lookup-section-sessions {
  flex: 0 0 auto;
  margin-top: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.lookup-session-table-wrap {
  flex: 0 0 auto;
  /* 表头 + 3 行；超出后表格内滚动 */
  max-height: calc(32px * 4);
  overflow: auto;
  margin-top: 6px;
  border: 1px solid var(--c-border, #e4e7ed);
  border-radius: 6px;
}
.lookup-session-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  line-height: 20px;
}
.lookup-session-table th,
.lookup-session-table td {
  padding: 6px 8px;
  height: 32px;
  box-sizing: border-box;
  text-align: left;
  border-bottom: 1px solid var(--c-border, #eef0f3);
  white-space: nowrap;
  line-height: 20px;
}
.lookup-session-table th {
  position: sticky;
  top: 0;
  background: var(--c-bg-elevated, #fafafa);
  font-weight: 600;
}
html[data-theme="dark"] .lookup-session-table-wrap { border-color: #30363d; }
html[data-theme="dark"] .lookup-session-table th { background: #161b22; }
html[data-theme="dark"] .lookup-session-table td { border-bottom-color: #21262d; }
.lookup-profile-row { margin-top: 10px; padding-top: 8px; border-top: 1px dashed #e4e7ed; }
.lookup-col-ops .lookup-label { min-width: 64px; }
.lookup-card-loading { align-items: center; min-height: 72px; }
.btn-lookup-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: #909399;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
}
.btn-lookup-close:hover { background: rgba(0,0,0,.06); color: #606266; }
.lookup-loading-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid #e4e7ed;
  border-top-color: #409eff;
  border-radius: 50%;
  animation: lookup-spin .8s linear infinite;
  flex-shrink: 0;
}
@keyframes lookup-spin { to { transform: rotate(360deg); } }
.lookup-loading-text { color: #606266; margin: 0; }
.lookup-section {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed #e4e7ed;
}
.lookup-section-title {
  font-size: 12px;
  font-weight: 600;
  color: #909399;
  margin-bottom: 6px;
  letter-spacing: .02em;
}
.lookup-info {
  flex: 1;
  min-width: 0;
  min-height: 0;
  font-size: 13px;
  line-height: 1.8;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.lookup-header-row { flex: 0 0 auto; gap: 10px; }
.data-card .card-handle-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.data-card .card-handle-btn,
.data-card .card-nick-btn { font-weight: 600; padding: 0; border: none; background: none; }
.data-card .card-nick-btn { color: #606266; font-weight: 500; }
.lookup-card-notfound { background: #fef0f0; border-color: #fde2e2; }
.lookup-notfound-msg { margin: 8px 0 4px; font-size: 15px; font-weight: 600; color: #f56c6c; }
.lookup-notfound-hint { margin: 0; font-size: 12px; color: #909399; line-height: 1.6; }
.lookup-avatar { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.lookup-avatar-ph { width: 64px; height: 64px; border-radius: 50%; background: #e4e7ed; flex-shrink: 0; display: inline-block; }
.lookup-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.lookup-label { color: #909399; min-width: 52px; }
.lookup-handle-id { color: #409eff; font-weight: 600; }
.lookup-handle-nick { color: #606266; font-weight: 500; }
.lookup-info a { word-break: break-all; }
.lookup-row-block { align-items: flex-start; }
.coin-diamond-val {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  vertical-align: middle;
  white-space: nowrap;
}
.coin-diamond-icon {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  line-height: 0;
  font-size: 14px;
  color: #e6a23c;
  padding-top: 1px;
}
html[data-theme="dark"] .coin-diamond-icon {
  color: #f3d19e;
}
.lookup-coin-item .coin-diamond-val { font-weight: 600; }
.lookup-coin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 6px 14px;
  flex: 1;
}
.lookup-coin-grid-primary { margin-bottom: 2px; }
.lookup-coin-grid-period {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--c-border-light, #ebeef5);
  opacity: 0.92;
}
.lookup-coin-hint {
  margin-top: 6px;
  font-size: 12px;
  color: var(--c-text-muted, #909399);
  line-height: 1.4;
}
.lookup-coin-item { display: flex; flex-direction: column; gap: 2px; font-size: 12px; }
.lookup-coin-item .lookup-label { min-width: 0; }
.coin-breakdown-sub {
  display: block;
  margin-top: 2px;
  font-size: 10px;
  line-height: 1.25;
  color: #909399;
  font-weight: 400;
  white-space: normal;
}
.col-nick-btn {
  display: block;
  max-width: 140px;
}
.col-nick-empty { color: #c0c4cc; }
html[data-theme="dark"] .col-nick-empty { color: #6b7280; }
.handle-cell-id .handle-link {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.handle-nick.btn-streamer-detail,
.handle-id-detail.btn-streamer-detail {
  border: none;
  background: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  text-align: left;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* 主播 ID：蓝色，与 TikTok 外链一致 */
.handle-cell .handle-link,
.handle-id-detail.btn-streamer-detail,
.member-handle-text.btn-streamer-detail {
  color: #409eff;
  font-weight: 500;
  font-size: 13px;
  line-height: 22px;
}
/* 昵称：灰色，与 ID 区分 */
.handle-nick.btn-streamer-detail {
  flex: 1 1 auto;
  min-width: 0;
  color: #606266;
  font-weight: 400;
  font-size: 12px;
  line-height: 22px;
}
.member-handle-text.btn-streamer-detail {
  border: none;
  background: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  font: inherit;
}
.handle-cell .handle-link:hover,
.handle-id-detail.btn-streamer-detail:hover,
.member-handle-text.btn-streamer-detail:hover {
  color: #66b1ff;
  text-decoration: underline;
}
.handle-nick.btn-streamer-detail:hover {
  color: #303133;
  text-decoration: underline;
}
.btn-copy-profile { height: 26px; padding: 0 10px; font-size: 12px; }

.create-user-form { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; padding: 12px; background: #f5f7fa; border-radius: 4px; }
.create-user-form input, .create-user-form select { height: 32px; border: 1px solid #dcdfe6; border-radius: 4px; padding: 0 8px; }
.create-user-msg { flex: 1 1 100%; margin: 0; min-height: 1.2em; }
.team-create-hint { margin: 0 0 10px; }

.profile-card { max-width: 400px; padding: 20px; }
.profile-card h3 { margin-bottom: 16px; }
.profile-card p { margin: 10px 0; }
.profile-card .hint { color: #909399; font-size: 12px; margin-top: 20px; }
.profile-password { margin-top: 24px; padding-top: 16px; border-top: 1px solid #ebeef5; }
.profile-password h4 { margin-bottom: 12px; font-size: 15px; }
.profile-password input { width: 100%; height: 38px; border: 1px solid #dcdfe6; border-radius: 4px; padding: 0 10px; margin-bottom: 10px; }
.profile-password .btn { margin-top: 4px; }
.modal-overlay {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(0,0,0,.45);
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
}
/* 强制改密：不挡住整页，便于同时创建组员等操作 */
.modal-overlay.pwd-force-mode {
  background: rgba(0, 0, 0, 0.12);
  pointer-events: none;
  align-items: flex-start;
  justify-content: center;
  padding-top: 64px;
}
.modal-overlay.pwd-force-mode .modal-card {
  pointer-events: auto;
  border: 2px solid #e6a23c;
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.22);
}
.modal-card {
  background: var(--c-surface);
  color: var(--c-text);
  border-radius: 8px;
  padding: 24px;
  width: 400px;
  max-width: 100%;
  box-shadow: 0 8px 30px rgba(0,0,0,.2);
  border: 1px solid var(--c-border);
}
.modal-card h3 { margin-bottom: 8px; color: var(--c-text); }
.modal-card input {
  width: 100%;
  height: 40px;
  border: 1px solid var(--c-border);
  border-radius: 4px;
  padding: 0 12px;
  margin-bottom: 10px;
  background: var(--c-surface-soft);
  color: var(--c-text);
}
.modal-card .full { width: 100%; margin-top: 8px; }
.err-text { color: #f56c6c; }

/* 组员卡片 */
.member-cards { display: flex; flex-direction: column; gap: 10px; }
.data-cards { display: none; flex-direction: column; gap: 10px; }
.rank-cards { display: none; flex-direction: column; gap: 10px; }
.follow-cards { display: none; flex-direction: column; gap: 10px; }
.rank-badge {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  line-height: 36px;
  text-align: center;
  font-weight: 700;
  font-size: 13px;
  color: #409eff;
  background: #ecf5ff;
  border-radius: 8px;
}
.follow-card {
  padding: 12px 14px;
  border: 1px solid var(--c-border-light);
  border-radius: 8px;
  background: var(--c-surface);
}
.follow-card-total { background: var(--c-surface-soft); border-color: var(--c-border); }
.follow-card-name { font-weight: 600; font-size: 14px; margin-bottom: 8px; color: var(--c-text); }
.follow-card-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px 12px;
  font-size: 12px;
  color: var(--c-text-muted);
}
.follow-card-stats b { color: var(--c-text); font-weight: 600; }
.team-toolbar .search-q { min-width: 180px; }
.team-dept-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 10px;
}
.team-dept-tab {
  border: 1px solid var(--c-border);
  background: var(--c-surface);
  color: var(--c-text-muted);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
  cursor: pointer;
  line-height: 1.2;
}
.team-dept-tab b {
  color: var(--c-text);
  font-weight: 600;
  margin-left: 2px;
}
.team-dept-tab.active {
  border-color: var(--c-primary, #3b82f6);
  background: rgba(59, 130, 246, 0.16);
  color: var(--c-text);
}
.team-summary {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--c-text-muted);
}
.team-cards { display: none; flex-direction: column; gap: 10px; }
.team-card {
  padding: 12px 14px;
  border: 1px solid var(--c-border-light);
  border-radius: 8px;
  background: var(--c-surface);
}
.team-card-head { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.team-card-titles { min-width: 0; flex: 1; }
.team-card-name { font-weight: 600; font-size: 14px; color: var(--c-text); }
.team-card-user { font-size: 12px; color: var(--c-text-muted); margin-top: 2px; }
.team-card-meta { font-size: 12px; color: var(--c-text-muted); margin-top: 6px; line-height: 1.45; }
.team-card-region .user-region-sel { width: 100%; max-width: 200px; margin-top: 4px; }
.team-card-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--c-border-light); }
.team-card-actions .btn { font-size: 12px; }
.mobile-toolbar { display: none; }
.mobile-sort-sel { border: 1px solid var(--c-border); border-radius: 6px; background: var(--c-surface); color: var(--c-text); }
.data-card {
  display: flex; gap: 10px; padding: 12px; border: 1px solid var(--c-border-light);
  border-radius: 8px; align-items: flex-start; background: var(--c-surface);
  color: var(--c-text);
}
.data-card .row-check { flex-shrink: 0; margin-top: 16px; }
.data-card img, .data-card .card-ph {
  width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex-shrink: 0;
}
.data-card .card-ph { background: #e4e7ed; }
.data-card .card-info { flex: 1; min-width: 0; font-size: 12px; }
.data-card .card-handle { font-weight: 600; color: var(--c-text); word-break: break-all; }
.data-card .card-meta { color: var(--c-text-muted); margin-top: 4px; line-height: 1.45; }
.member-toolbar-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-bottom: 10px;
}
.member-toolbar-row .member-status-tabs { margin-bottom: 0; }
.member-toolbar-row .member-quick-filters { margin: 0; }
.member-quick-filters {
  display: inline-flex;
  gap: 0;
  margin: 0 0 10px;
  padding: 2px;
  border: 1px solid var(--c-border, #dcdfe6);
  border-radius: 6px;
  background: var(--c-surface-soft, #f5f7fa);
  flex-wrap: nowrap;
}
.member-qf {
  border: none;
  background: transparent;
  color: var(--c-text-secondary);
  border-radius: 4px;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
}
.member-qf.active {
  background: #409eff;
  color: #fff;
}
.member-status-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.member-card {
  display: flex; gap: 12px; padding: 14px;
  border: 1px solid var(--c-border-light);
  border-radius: 8px;
  align-items: flex-start;
  background: var(--c-surface);
  color: var(--c-text);
}
.member-card img.member-card-avatar,
.member-card .card-ph.member-card-avatar {
  width: 48px;
  height: 48px;
  min-width: 48px;
  min-height: 48px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  cursor: pointer;
  display: block;
  background: #e4e7ed;
}
.member-card .card-ph.member-card-avatar:active { opacity: 0.85; }
.member-avatar-initial,
.card-ph-initial,
.avatar-ph-initial,
.lookup-avatar-initial {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 600;
  color: #909399;
}
.card-ph { width: 48px; height: 48px; border-radius: 50%; background: #e4e7ed; flex-shrink: 0; }
.card-info { flex: 1; min-width: 0; }
.card-handle-row { display: flex; align-items: center; gap: 10px; flex-wrap: nowrap; margin-bottom: 4px; }
.card-handle {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 16px;
  font-weight: 600;
  color: #409eff;
  text-decoration: none;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
a.card-handle:active { opacity: 0.75; }
.card-handle-row .btn-link,
.card-handle-row .btn-copy-one {
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  font-size: 13px;
  padding: 2px 8px;
  line-height: 1.4;
  color: #409eff;
  white-space: nowrap;
}
.card-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 10px; padding-top: 8px; border-top: 1px solid #f0f2f5; }
.card-actions .btn-link { font-size: 13px; padding: 0; line-height: 1.4; }
.card-meta { font-size: 12px; color: #909399; margin-top: 4px; }

/* 弹窗 */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: flex; align-items: center; justify-content: center; z-index: 200; }
#assignModal { z-index: 10050; }
.modal-box { background: #fff; padding: 24px; border-radius: 8px; width: 360px; max-width: 92vw; }
.modal-box select { width: 100%; height: 36px; margin: 12px 0; border: 1px solid #dcdfe6; border-radius: 6px; }
.assign-modal-box { width: 440px; }
.assign-target-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 0 6px;
  font-size: 13px;
  color: var(--c-text-muted, #909399);
}
.assign-target-list {
  max-height: 240px;
  overflow: auto;
  border: 1px solid var(--c-border, #dcdfe6);
  border-radius: 6px;
  padding: 6px 8px;
  background: var(--c-surface, #fff);
}
.assign-member-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 6px 4px;
  font-size: 13px;
  color: var(--c-text, #303133);
  cursor: pointer;
  border-radius: 4px;
}
.assign-member-item:hover { background: var(--c-surface-soft, #f5f7fa); }
.assign-member-item input { margin-top: 2px; flex-shrink: 0; }
.assign-member-item span { line-height: 1.4; word-break: break-all; }
.assign-workload {
  margin: 8px 0 10px;
  padding: 8px 10px;
  background: #f5f7fa;
  border-radius: 6px;
  font-size: 12px;
  line-height: 1.55;
  color: #606266;
}
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }

.retention-card {
  max-width: 520px;
  margin-bottom: 16px;
  padding: 14px 16px;
  background: #f5f7fa;
  border: 1px solid #ebeef5;
  border-radius: 8px;
}
.retention-card h4 { margin: 0 0 10px; font-size: 15px; color: #303133; }
.retention-row { display: block; margin: 8px 0; font-size: 14px; color: #606266; }
.retention-row input[type="checkbox"] { margin-right: 8px; vertical-align: middle; }
.retention-days { width: 72px; margin: 0 6px; padding: 4px 8px; border: 1px solid #dcdfe6; border-radius: 4px; }
.retention-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0 8px; }

/* 组员批量操作栏 */
.member-batch-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-bottom: 12px;
  padding: 10px 12px;
  background: #f5f7fa;
  border: 1px solid #ebeef5;
  border-radius: 6px;
  font-size: 13px;
}
.member-batch-bar b { color: #409eff; }
.member-table .col-sel,
.member-table td:first-child { width: 36px; text-align: center; padding-left: 4px; padding-right: 4px; }
.member-card-check { flex-shrink: 0; width: 18px; height: 18px; margin-top: 15px; }
.member-card-check-wrap {
  display: flex;
  align-items: flex-start;
  flex-shrink: 0;
}
.member-card-check-wrap .member-card-check { margin-top: 15px; }
.card-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}
.m-chip {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px 7px;
  border-radius: 4px;
  background: #f0f2f5;
  color: #606266;
  font-size: 12px;
  line-height: 1.35;
  font-weight: 500;
}
.m-chip-coin {
  background: #ecf5ff;
  color: #409eff;
}
.m-chip-coin .coin-diamond-icon {
  font-size: 12px;
  color: #e6a23c;
}
.m-chip-coin .coin-diamond-val {
  font-weight: 600;
}
.m-chip-rank {
  background: #f3e8ff;
  color: #7c3aed;
  font-weight: 700;
}
.member-card-rank {
  border-color: rgba(124, 58, 237, 0.28);
}
.card-meta-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
  align-items: center;
}
.card-meta-tags .tag {
  margin: 0;
  font-size: 11px;
  line-height: 1.35;
  padding: 1px 6px;
}
.m-status {
  height: 32px;
  padding: 0 14px;
  border: 1px solid var(--c-border);
  background: var(--c-surface);
  color: var(--c-text-secondary);
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
}
.m-status.active { background: #409eff; border-color: #409eff; color: #fff; }
.member-actions { white-space: nowrap; }
.member-actions .btn-link { margin-right: 6px; font-size: 12px; }
.sub-name { font-size: 12px; color: #909399; margin-top: 2px; }
.mobile-only { display: none; }
.hide-on-mobile { display: inline-block; }

.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 40;
}
.sidebar-backdrop.visible {
  display: block;
}

.col-filter-popover {
  position: fixed;
  z-index: 10000;
  width: max-content;
  min-width: 128px;
  max-width: 280px;
  background: #2b2f36;
  border: 1px solid #3d4450;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  padding: 0;
  font-size: 13px;
  color: #e8eaed;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.col-filter-list {
  overflow-x: hidden;
  overflow-y: visible;
  padding: 4px 0;
  scrollbar-width: thin;
  scrollbar-color: #4a5568 transparent;
}
.col-filter-list.is-scroll {
  overflow-y: auto;
  max-height: 280px;
}
.col-filter-list::-webkit-scrollbar { width: 5px; }
.col-filter-list::-webkit-scrollbar-thumb {
  background: #4a5568;
  border-radius: 3px;
}
.col-filter-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  cursor: pointer;
  user-select: none;
  line-height: 1.25;
}
.col-filter-item:hover { background: rgba(255, 255, 255, 0.06); }
.col-filter-item-text {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.col-filter-item input[type=checkbox] {
  appearance: none;
  -webkit-appearance: none;
  width: 15px;
  height: 15px;
  margin: 0;
  flex-shrink: 0;
  border: 1px solid #5c6370;
  border-radius: 3px;
  background: #1e2228;
  cursor: pointer;
  position: relative;
}
.col-filter-item input[type=checkbox]:checked {
  background: #36cfc9;
  border-color: #36cfc9;
}
.col-filter-item input[type=checkbox]:checked::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 1px;
  width: 5px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
html[data-theme="dark"] .th-hint-btn,
html[data-theme="dark"] .th-filter-btn,
html[data-theme="dark"] .th-sort-btn { color: #8b919a; }
html[data-theme="dark"] .th-hint-btn:hover,
html[data-theme="dark"] .th-filter-btn:hover,
html[data-theme="dark"] .th-sort-btn:hover,
html[data-theme="dark"] .th-filter-btn.active,
html[data-theme="dark"] .th-sort-btn.active { color: #36cfc9; }
html[data-theme="dark"] .th-sorter:hover .th-head-label { color: #36cfc9; }

/* 浅色主题下图标默认灰色 */
html:not([data-theme="dark"]) .th-hint-btn,
html:not([data-theme="dark"]) .th-filter-btn,
html:not([data-theme="dark"]) .th-sort-btn { color: #909399; }

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  max-width: min(92vw, 520px);
  padding: 10px 18px;
  border-radius: 8px;
  background: rgba(48, 49, 51, 0.92);
  color: #fff;
  font-size: 14px;
  line-height: 1.45;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  white-space: pre-wrap;
  text-align: center;
}

.toast.hidden { display: none; }
.toast.toast-ok { background: rgba(103, 194, 58, 0.95); }
.toast.toast-err { background: rgba(245, 108, 108, 0.95); }
.toast.toast-info { background: rgba(48, 49, 51, 0.92); }

.notify-bar {
  position: fixed;
  bottom: 72px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9998;
  max-width: min(94vw, 560px);
  width: 100%;
}
.notify-bar.hidden { display: none; }
.notify-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 8px;
  background: #fff;
  color: #303133;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
  border: 1px solid #e4e7ed;
}
.notify-bar-msg { flex: 1; font-size: 14px; line-height: 1.45; white-space: pre-wrap; }
.notify-bar-actions { display: flex; gap: 8px; flex-shrink: 0; }
.notify-bar-actions .danger { background: #f56c6c; border-color: #f56c6c; color: #fff; }

.prompt-panel {
  position: fixed;
  bottom: 72px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9998;
  max-width: min(94vw, 400px);
  width: 100%;
}
.prompt-panel.hidden { display: none; }
.prompt-panel-box {
  padding: 16px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
  border: 1px solid #e4e7ed;
}
.prompt-panel-msg { margin: 0 0 10px; font-size: 14px; color: #303133; line-height: 1.45; }
.prompt-panel-box input {
  width: 100%;
  height: 40px;
  border: 1px solid #dcdfe6;
  border-radius: 4px;
  padding: 0 12px;
  margin-bottom: 12px;
}
.prompt-panel-actions { display: flex; justify-content: flex-end; gap: 8px; }

.table-wrap.is-loading {
  opacity: 0.55;
  pointer-events: none;
  position: relative;
}
.table-wrap.is-loading::after {
  content: '加载中…';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: #409eff;
  background: rgba(255, 255, 255, 0.6);
}

.member-handle { color: #409eff; text-decoration: none; cursor: pointer; }
.member-handle:hover { text-decoration: underline; }

/* 深色主题：黑底白字 */
html[data-theme="dark"] .login-page,
html[data-theme="dark"] .login-page .login-card,
html[data-theme="dark"] .login-page .login-card input,
html[data-theme="dark"] .login-page .login-captcha-img {
  color-scheme: light;
}
html[data-theme="dark"] .login-page { background: linear-gradient(135deg, #304156, #1a2332) !important; }
html[data-theme="dark"] .login-page .login-card {
  background: #fff;
  color: #303133;
  border: none;
}
html[data-theme="dark"] .login-page .login-card h1 { color: #304156; }
html[data-theme="dark"] .login-page .login-card input {
  background: #fff;
  color: #303133;
  border-color: #dcdfe6;
}
html[data-theme="dark"] .login-page .login-sub { color: #909399; }
html[data-theme="dark"] .login-page .login-captcha-img { background: #f5f7fa; border-color: #dcdfe6; }

html[data-theme="dark"] .drp-trigger {
  background: var(--c-surface);
  border-color: var(--c-border);
  color: var(--c-text-secondary);
}
html[data-theme="dark"] .drp-trigger.has-value { color: var(--c-text); }
html[data-theme="dark"] .drp-panel {
  background: #1f2a37;
  border-color: #30363d;
  box-shadow: 0 8px 24px rgba(0,0,0,.45);
}
html[data-theme="dark"] .drp-panel::before {
  background: #1f2a37;
  border-color: #30363d;
}
html[data-theme="dark"] .drp-day.in-range { background: rgba(64,158,255,.18); }
html[data-theme="dark"] .drp-nav-btn:hover { background: rgba(64,158,255,.12); }
html[data-theme="dark"] .drp-clear:hover { background: #30363d; color: #e6edf3; }

html[data-theme="dark"] a { color: var(--c-primary); }
html[data-theme="dark"] .sidebar.open { box-shadow: var(--sidebar-shadow); }
html[data-theme="dark"] .region-stat-card:hover {
  border-color: rgba(88, 166, 255, 0.35);
  background: rgba(88, 166, 255, 0.06);
}
html[data-theme="dark"] .side-stats {
  background: rgba(0, 0, 0, 0.12);
}
html[data-theme="dark"] .top-bar-brand { color: var(--c-text); }
html[data-theme="dark"] #userDisplay { color: var(--c-text); }
html[data-theme="dark"] .logoutBtn,
html[data-theme="dark"] #logoutBtn { color: var(--c-primary); }

html[data-theme="dark"] .data-table,
html[data-theme="dark"] .data-table th,
html[data-theme="dark"] .data-table td {
  background: var(--c-surface);
  color: var(--c-text);
  border-color: var(--c-border);
}
html[data-theme="dark"] .data-table th { background: var(--c-surface-soft); color: var(--c-text-muted); }
html[data-theme="dark"] .data-table tbody tr:hover td { background: var(--c-surface-soft); }
html[data-theme="dark"] .data-table tr.row-stale td { background: #2a1515; color: var(--c-text); }

html[data-theme="dark"] .pool-tab.active,
html[data-theme="dark"] .quick-filter.active,
html[data-theme="dark"] .m-status.active,
html[data-theme="dark"] .worker-filter-tabs .wk-filter.active {
  background: var(--c-primary);
  border-color: var(--c-primary);
  color: #fff;
}
html[data-theme="dark"] .pool-tab:not(.active):hover,
html[data-theme="dark"] .quick-filter:not(.active):hover {
  border-color: var(--c-primary);
  color: var(--c-primary);
  background: var(--c-surface-soft);
}

html[data-theme="dark"] .filter-bar input,
html[data-theme="dark"] .filter-bar select,
html[data-theme="dark"] .page-size-sel,
html[data-theme="dark"] .profile-password input,
html[data-theme="dark"] .create-user-form input,
html[data-theme="dark"] .create-user-form select,
html[data-theme="dark"] .retention-days,
html[data-theme="dark"] .prompt-panel-box input,
html[data-theme="dark"] .modal-box select {
  background: var(--c-surface-soft);
  border-color: var(--c-border);
  color: var(--c-text);
}

html[data-theme="dark"] .modal-card,
html[data-theme="dark"] .modal-box,
html[data-theme="dark"] .prompt-panel-box,
html[data-theme="dark"] .notify-bar-inner,
html[data-theme="dark"] .col-filter-popover {
  background: #2b2f36;
  border-color: #3d4450;
  color: #e8eaed;
}
html[data-theme="dark"] .col-filter-item:hover { background: rgba(255, 255, 255, 0.06); }

/* 浅色主题下筛选弹层同样使用深色面板（与参考图一致） */
html:not([data-theme="dark"]) .col-filter-popover {
  background: #2b2f36;
  border-color: #3d4450;
  color: #e8eaed;
}
html:not([data-theme="dark"]) .col-filter-item input[type=checkbox] {
  background: #1e2228;
  border-color: #5c6370;
}
html:not([data-theme="dark"]) .col-filter-item:hover { background: rgba(255, 255, 255, 0.06); }

html[data-theme="dark"] .prompt-panel-msg { color: var(--c-text); }
html[data-theme="dark"] .notify-bar-msg { color: var(--c-text); }
html[data-theme="dark"] .mobile-sort-sel {
  background: var(--c-surface-soft);
  border-color: var(--c-border);
  color: var(--c-text);
}
html[data-theme="dark"] .rank-badge { background: rgba(64, 158, 255, 0.15); color: #79bbff; }

html[data-theme="dark"] .lookup-card,
html[data-theme="dark"] .lookup-card-notfound {
  background: var(--c-surface-soft);
  border-color: var(--c-border-light);
}
html[data-theme="dark"] .lookup-card-notfound { background: #2a1515; border-color: #5c2626; }
html[data-theme="dark"] .lookup-section { border-top-color: var(--c-border); }
html[data-theme="dark"] .lookup-col-ops { border-left-color: var(--c-border); border-top-color: var(--c-border); }
html[data-theme="dark"] .lookup-profile-row { border-top-color: var(--c-border); }
html[data-theme="dark"] .btn-lookup-close { color: var(--c-text-muted); }
html[data-theme="dark"] .btn-lookup-close:hover { background: rgba(255,255,255,.08); color: var(--c-text); }
html[data-theme="dark"] .lookup-notfound-msg { color: #f89898; }
html[data-theme="dark"] .lookup-handle-id { color: #79bbff; }
html[data-theme="dark"] .lookup-handle-nick { color: #a8abb2; }
html[data-theme="dark"] .create-user-form,
html[data-theme="dark"] .member-batch-bar,
html[data-theme="dark"] .assign-workload,
html[data-theme="dark"] .retention-card {
  background: var(--c-surface-soft);
  border-color: var(--c-border);
  color: var(--c-text-secondary);
}
html[data-theme="dark"] #page-member-sea .member-batch-bar {
  background: rgba(30, 34, 42, 0.94);
}
html[data-theme="dark"] .m-chip {
  background: #2a3240;
  color: var(--c-text-secondary, #c0c4cc);
}
html[data-theme="dark"] .m-chip-coin {
  background: rgba(64, 158, 255, 0.15);
  color: #79bbff;
}
html[data-theme="dark"] .m-chip-rank {
  background: rgba(124, 58, 237, 0.22);
  color: #c4b5fd;
}
html[data-theme="dark"] .member-card-rank {
  border-color: rgba(124, 58, 237, 0.4);
}
html[data-theme="dark"] .m-chip-coin .coin-diamond-icon {
  color: #f3d19e;
}
html[data-theme="dark"] .retention-card h4,
html[data-theme="dark"] .retention-row,
html[data-theme="dark"] .profile-card h3,
html[data-theme="dark"] .profile-card p { color: var(--c-text); }
html[data-theme="dark"] .profile-card .hint,
html[data-theme="dark"] .lookup-label,
html[data-theme="dark"] .card-meta,
html[data-theme="dark"] .sub-name,
html[data-theme="dark"] .empty,
html[data-theme="dark"] .handle-cell .handle-link,
html[data-theme="dark"] .handle-id-detail.btn-streamer-detail,
html[data-theme="dark"] .member-handle-text.btn-streamer-detail {
  color: #79bbff;
}
html[data-theme="dark"] .handle-nick,
html[data-theme="dark"] .handle-nick.btn-streamer-detail {
  color: #a8abb2;
}
html[data-theme="dark"] .handle-nick.btn-streamer-detail:hover {
  color: #e5eaf3;
}

html[data-theme="dark"] .worker-summary-bar span,
html[data-theme="dark"] .wk-log-cell,
html[data-theme="dark"] .wk-region-meta { color: var(--c-text-secondary); }
html[data-theme="dark"] .worker-card.stale { background: #2a1515; border-color: #5c3030; }
html[data-theme="dark"] .worker-data-banner {
  background: #0d1f33;
  border-color: #1e4a7a;
  color: var(--c-primary);
}

html[data-theme="dark"] .hint-warn {
  background: #2a2210;
  color: #f3d19e;
}
html[data-theme="dark"] .tag-ok { background: #142612; color: #95d475; border-color: #2d4a28; }
html[data-theme="dark"] .tag-warn { background: #2a2210; color: #f3d19e; border-color: #4a3a18; }
html[data-theme="dark"] .tag-gray,
html[data-theme="dark"] .tag-danger { background: var(--c-surface-soft); color: var(--c-text-muted); border-color: var(--c-border); }
html[data-theme="dark"] .tag-region { background: #0d1f33; color: var(--c-primary); border-color: #1e4a7a; }
html[data-theme="dark"] .tag-invite-regular { background: #0d1f33; color: #79bbff; border-color: #1e4a7a; }
html[data-theme="dark"] .tag-invite-advanced { background: #2a2210; color: #f3d19e; border-color: #4a3a18; }
html[data-theme="dark"] .tag-invite-other { background: var(--c-surface-soft); color: var(--c-text-muted); border-color: var(--c-border); }
html[data-theme="dark"] .tag-live-mic { background: #142612; color: #95d475; border-color: #2d4a28; }
html[data-theme="dark"] .tag-live-pk { background: rgba(245, 108, 108, 0.15); color: #f89898; border-color: #5c2a2a; }
html[data-theme="dark"] .quick-filter-regular:not(.active) { color: #79bbff; border-color: #1e4a7a; background: #0d1f33; }
html[data-theme="dark"] .quick-filter-regular.active { background: #409eff; border-color: #409eff; color: #fff; }
html[data-theme="dark"] .quick-filter-advanced:not(.active) { color: #f3d19e; border-color: #4a3a18; background: #2a2210; }
html[data-theme="dark"] .quick-filter-advanced.active { background: #e6a23c; border-color: #e6a23c; color: #fff; }

html[data-theme="dark"] .btn.danger {
  background: #2a1515;
  border-color: #5c3030;
  color: #ff8a8a;
}
html[data-theme="dark"] .btn-page-nav:disabled {
  background: var(--c-surface-soft);
  border-color: var(--c-border);
  color: var(--c-text-muted);
}
html[data-theme="dark"] .follow-total-row td { background: var(--c-surface-soft); color: var(--c-text); }

html[data-theme="dark"] .card-actions { border-top-color: var(--c-border); }
html[data-theme="dark"] .profile-password { border-top-color: var(--c-border); }
html[data-theme="dark"] .filter-bar.simple { border-bottom-color: var(--c-border); }

html[data-theme="dark"] .admin-more-panel {
  background: var(--c-surface);
  border-color: var(--c-border);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
}

html[data-theme="dark"] .table-wrap.is-loading::after {
  background: rgba(0, 0, 0, 0.72);
  color: var(--c-primary);
}

html[data-theme="dark"] .toast {
  background: #1a1a1a;
  border: 1px solid var(--c-border);
  color: #fff;
}
html[data-theme="dark"] .help-center-body,
html[data-theme="dark"] .help-center-body h4,
html[data-theme="dark"] .help-center-body li { color: var(--c-text); }

html[data-theme="dark"] .notify-item.unread { background: rgba(88, 166, 255, 0.12); }
html[data-theme="dark"] .notify-item-desc { color: var(--c-text-muted); }

html[data-theme="dark"] .avatar-ph,
html[data-theme="dark"] .card-ph,
html[data-theme="dark"] .lookup-avatar-ph,
html[data-theme="dark"] .profile-avatar.profile-avatar-empty,
html[data-theme="dark"] .profile-avatar {
  background-color: var(--c-surface-soft);
  color: var(--c-text-muted);
}

@media (max-width: 900px) {
  .top-toolbar-divider { display: none; }
  .top-tool-btn { width: 32px; height: 32px; }
}

.rank-toolbar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 8px;
}
.rank-filter-row,
.rank-action-row {
  margin: 0;
}
.rank-action-row {
  padding-top: 2px;
  border-top: 1px dashed var(--c-border);
}
.rank-action-group-label {
  font-size: 12px;
  color: var(--c-text-muted);
  margin-right: 2px;
  flex-shrink: 0;
}
.rank-action-sep {
  width: 1px;
  height: 20px;
  background: var(--c-border);
  margin: 0 6px;
  flex-shrink: 0;
}
.rank-import-bar { flex-wrap: wrap; }
.filter-bar .rank-import-mode-sel {
  width: auto;
  min-width: 108px;
  max-width: 220px;
}
.rank-import-meta { margin: 0 0 10px; font-size: 13px; color: var(--c-text-muted); }
.rank-member-hint {
  margin: 0;
  font-size: 12px;
  color: var(--c-text-muted, #697586);
}
.rank-coverage-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  margin: 0 0 4px;
  padding: 8px 10px;
  border: 1px solid var(--c-border, #d5dce0);
  border-radius: 8px;
  background: var(--c-surface-soft, #f8fafc);
  font-size: 13px;
  color: var(--c-text-muted, #697586);
}
.rank-cov-date { font-weight: 600; color: var(--c-text, #172033); margin-right: 4px; }
.rank-cov-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 26px;
  padding: 2px 10px;
  border-radius: 999px;
  border: 1px solid #d0d7de;
  font-size: 12px;
  line-height: 1.2;
  background: #f6f8fa;
  cursor: pointer;
  font-family: inherit;
}
.rank-cov-chip:hover { border-color: #409eff; color: #409eff; }
.rank-cov-chip.ok { border-color: #3fb950; color: #1a7f37; background: #dafbe1; }
.rank-cov-chip.partial { border-color: #d4a72c; color: #9a6700; background: #fff8c5; }
.rank-cov-chip.miss { border-color: #d0d7de; color: #8b949e; }
.rank-cov-chip.active {
  box-shadow: 0 0 0 2px rgb(64 158 255 / 28%);
  border-color: #409eff;
}
.rank-cov-total { margin-left: 4px; }
.rank-cov-hint { margin-left: auto; font-size: 12px; color: var(--c-text-muted, #8b949e); }
html[data-theme="dark"] .rank-coverage-bar { background: #161b22; border-color: #30363d; }
html[data-theme="dark"] .rank-cov-date { color: #e6edf3; }
html[data-theme="dark"] .rank-cov-chip { background: #21262d; border-color: #30363d; color: #c9d1d9; }
html[data-theme="dark"] .rank-cov-chip.ok { background: #12261e; border-color: #238636; color: #3fb950; }
html[data-theme="dark"] .rank-cov-chip.partial { background: #2a2100; border-color: #9a6700; color: #d4a72c; }
html[data-theme="dark"] .rank-cov-chip:hover,
html[data-theme="dark"] .rank-cov-chip.active { border-color: #58a6ff; color: #58a6ff; }
.rank-toolbar.toolbar-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0 0 8px;
}
.rank-category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.rank-category-tabs .rank-cat-btn {
  font-size: 13px;
  padding: 5px 12px;
}
.rank-category-tabs .rank-cat-btn.active {
  background: #409eff;
  color: #fff;
  border-color: #409eff;
}
.rank-label-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.rank-label-chip {
  min-height: 28px;
  padding: 2px 10px;
  border: 1px solid var(--c-border, #d5dce0);
  border-radius: 999px;
  background: #fff;
  color: #526273;
  font-size: 12px;
  cursor: pointer;
}
.rank-label-chip:hover { border-color: #409eff; color: #409eff; }
.rank-label-chip.active {
  border-color: #409eff;
  background: #409eff;
  color: #fff;
}
html[data-theme="dark"] .rank-category-tabs .rank-cat-btn.active {
  background: #58a6ff;
  border-color: #58a6ff;
  color: #0b1220;
}
html[data-theme="dark"] .rank-label-chip {
  background: #161b22;
  border-color: #30363d;
  color: #c9d1d9;
}
html[data-theme="dark"] .rank-label-chip.active {
  background: #58a6ff;
  border-color: #58a6ff;
  color: #0b1220;
}
.rank-import-panel {
  margin: 0 0 12px;
  padding: 12px;
  border: 1px solid var(--c-border);
  border-radius: 8px;
  background: var(--c-surface-soft, #f8fafc);
}
.rank-import-panel textarea {
  width: 100%;
  box-sizing: border-box;
  font-family: inherit;
  font-size: 13px;
  padding: 8px;
  border: 1px solid var(--c-border);
  border-radius: 6px;
  resize: vertical;
}
.rank-import-panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
  align-items: center;
}
.rank-import-panel-actions input {
  flex: 1 1 160px;
  min-width: 120px;
  padding: 6px 10px;
  border: 1px solid var(--c-border);
  border-radius: 6px;
}
.rank-guild-job {
  margin: 0 0 10px;
  padding: 8px 12px;
  border-radius: 6px;
  background: #e8f4fd;
  color: #1565c0;
  font-size: 13px;
}
html[data-theme="dark"] .rank-import-panel { background: var(--c-surface); }
html[data-theme="dark"] .rank-guild-job { background: rgba(21, 101, 192, 0.15); color: #90caf9; }
.filter-bar .rank-list-label-sel { width: 120px; }
.filter-bar .rank-invitable-sel { width: 96px; }
.filter-bar .rank-search-q { width: 140px; min-width: 100px; }
