#app {
  --side: #172437;
  --side-soft: #22344d;
  --bg: #f2f5f9;
  --line: #e4eaf2;
  background: var(--bg);
}

#app .sidebar { position: sticky; top: 0; height: 100dvh; width: 204px; flex: 0 0 204px; }
#app .brand { min-height: 65px; padding: 14px 17px; text-decoration: none; border-bottom: 1px solid #ffffff14; }
#app .menu { padding: 16px 10px; }
.workspace-nav-link {
  display: grid; grid-template-columns: 22px 1fr auto; align-items: center; gap: 10px;
  min-height: 45px; margin-bottom: 4px; padding: 0 11px;
  border-radius: 6px; text-decoration: none; color: #c4cfde; font-size: 14px;
}
.workspace-nav-link:hover { color: #fff; background: var(--side-soft); }
.workspace-nav-link.active { color: #fff; background: #2a61ca; font-weight: 600; }
.workspace-icon { text-align: center; font: 18px/1 system-ui, sans-serif; }
.workspace-nav-arrow { font-size: 18px; opacity: .65; }
#app .topbar { position: sticky; top: 0; z-index: 5; height: 65px; flex-basis: 65px; gap: 10px; }
.topbar-left { min-width: 0; display: flex; align-items: center; gap: 12px; }
@media (min-width: 901px) {
  #app .content { padding-inline: clamp(24px, 3vw, 48px); }
  #app .topbar { padding-inline: clamp(24px, 3vw, 48px); }
}
#workspaceMenuToggle, #workspaceScrim { display: none; }
.workspace-nav-group > summary { list-style: none; cursor: pointer; }
.workspace-nav-group > summary::-webkit-details-marker { display: none; }
.workspace-nav-group.active > summary { color: #fff; background: var(--side-soft); }
.workspace-nav-group[open] .workspace-nav-arrow { transform: rotate(90deg); }
.workspace-submenu { display: grid; gap: 2px; margin: 0 0 10px 22px; border-left: 1px solid #ffffff22; padding-left: 8px; }
.workspace-submenu a { padding: 8px 10px; color: #bdc9db; border-radius: 5px; text-decoration: none; font-size: 13px; }
.workspace-submenu a:hover { color: #fff; background: var(--side-soft); }
.workspace-submenu a[aria-current] { color: #fff; background: #2a61ca; }
#app .page-head h2 { font-size: clamp(20px, 2vw, 25px); font-weight: 650; }
.workspace-shortcuts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 24px; }
.workspace-shortcuts a {
  min-width: 0; min-height: 91px; display: flex; align-items: center; gap: 12px; padding: 12px;
  background: #fff; border: 1px solid var(--line); border-radius: 8px; text-decoration: none; color: var(--text);
}
.workspace-shortcuts a:hover { border-color: #8eafed; box-shadow: 0 3px 12px #2255a812; }
.shortcut-icon {
  display: grid; place-items: center; flex: 0 0 34px; width: 34px; height: 34px;
  color: #2457bd; background: #ebf1fe; font: 19px/1 system-ui, sans-serif; border-radius: 7px;
}
.workspace-shortcuts strong, .workspace-shortcuts small { display: block; }
.workspace-shortcuts small { margin-top: 4px; color: #52627a; font-size: 11.5px; line-height: 1.45; }
.shortcut-arrow { margin-left: auto; color: #5275ae; font-size: 19px; }
.workspace-section-title { margin: 0 0 10px; font-size: 15px; }
.workspace-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.workspace-tables { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.workspace-card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.workspace-card-head a { color: var(--primary); font-size: 12px; text-decoration: none; white-space: nowrap; }
#workspaceSearch {
  width: min(95vw, 530px); max-height: 75vh; padding: 0; border: 1px solid var(--line); border-radius: 10px;
  background: #fff; color: var(--text); box-shadow: 0 18px 42px #17243735;
}
#workspaceSearch::backdrop { background: #17243780; }
#workspaceSearchInput { width: calc(100% - 36px); margin: 14px 18px 6px; border: 1px solid var(--line); border-radius: 6px; padding: 8px 11px; }
#workspaceSearchResults { display: grid; gap: 2px; padding: 6px 18px 14px; }
#workspaceSearchResults a { display: flex; justify-content: space-between; gap: 12px; padding: 7px 9px; text-decoration: none; color: var(--text); border-radius: 5px; }
#workspaceSearchResults a:hover, #workspaceSearchResults a:focus-visible { background: #edf3ff; color: var(--primary); }
#workspaceSearchResults small { color: #52627a; }

@media (max-width: 1180px) {
  .workspace-shortcuts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 780px) {
  #app .sidebar { display: none; position: fixed; z-index: 10; left: 0; }
  #app.workspace-menu-open .sidebar { display: flex; }
  #workspaceMenuToggle { display: block; padding: 6px; }
  .workspace-menu-open #workspaceScrim { display: block; position: fixed; inset: 0; border: 0; background: #17243766; z-index: 9; }
  #app .topbar { padding-inline: 12px; }
  #app .topbar-right { gap: 6px; white-space: nowrap; }
  #app .who { display: none; }
  #app .content { padding: 16px 12px 26px; }
  .workspace-tables { grid-template-columns: minmax(0, 1fr); }
  .workspace-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 420px) {
  #app .crumb span { display: none; }
  .workspace-shortcuts a { gap: 8px; padding: 9px; }
  .shortcut-icon { flex-basis: 25px; width: 25px; height: 28px; font-size: 15px; }
  .shortcut-arrow { display: none; }
}

/* 会员列表勾选与批量删除 */
.head-check { width: 36px; text-align: center; }
.row-check { width: 36px; text-align: center; }
.row-check input[type="checkbox"], .head-check input[type="checkbox"] { width: 15px; height: 15px; cursor: pointer; accent-color: var(--primary); }
.member-admin-table td.row-check { position: sticky; left: 0; background: var(--card); }
.member-admin-table tbody tr:hover td.row-check { background: #f8faff; }
