:root {
  --primary: #18181b;
  --primary-dark: #09090b;
  --primary-light: #f4f4f5;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-soft: #eff6ff;
  --accent-ring: rgba(37, 99, 235, 0.2);
  --bg: #fafafa;
  --bg-accent: none;
  --surface: #ffffff;
  --surface-muted: #fafafa;
  --sidebar-edge: #e4e4e7;
  --border: #e4e4e7;
  --border-strong: #d4d4d8;
  --text: #18181b;
  --muted: #71717a;
  --danger: #dc2626;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(24, 24, 27, 0.04);
  --shadow: 0 4px 24px rgba(24, 24, 27, 0.06);
  --shadow-md: 0 12px 40px rgba(24, 24, 27, 0.1);
  --shadow-card-hover: 0 12px 32px rgba(24, 24, 27, 0.08);
  /* 动效：交互用短时长 + soft，入场用略长 + out */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-soft: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-in-out: cubic-bezier(0.45, 0, 0.25, 1);
  --t-micro: 0.08s;
  --t-fast: 0.14s;
  --t: 0.2s;
  --t-slow: 0.34s;
  --font: "Inter", "Segoe UI", system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --sidebar-w: 268px;
}

html {
  scroll-behavior: smooth;
  /* 避免切换页面时因纵向滚动条显隐导致主内容区左右「跳」一下 */
  scrollbar-gutter: stable;
}

/* 全局滚动条（网页端） */
* {
  scrollbar-width: thin;
  scrollbar-color: #94a3b8 #f1f5f9;
}

*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

*::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 999px;
}

*::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #94a3b8 0%, #64748b 100%);
  border-radius: 999px;
  border: 2px solid #f1f5f9;
}

*::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #64748b 0%, #475569 100%);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

::selection {
  background: rgba(37, 99, 235, 0.15);
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

:focus:not(:focus-visible) {
  outline: none;
}

button:focus-visible,
.sidebar-pill:focus-visible,
.nav-branch-toggle:focus-visible {
  outline-offset: 3px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: var(--font);
  font-size: 14px;
  color: var(--text);
  background-color: var(--bg);
  background-image: var(--bg-accent);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--t) var(--ease-soft);
}

a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .flash-ok,
  .flash-error,
  .flash-warn {
    animation: none !important;
  }

  .role-edit-modal[open] {
    animation: none !important;
  }

  .main-inner > *:not(.flash) {
    animation: none !important;
  }

  .nav-branch-panel {
    transition: none !important;
  }
}

.layout {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 100vh;
  align-items: start;
}

.sidebar {
  background: var(--surface);
  border-right: 1px solid var(--sidebar-edge);
  display: flex;
  flex-direction: column;
  padding: 0;
  min-height: 100vh;
  position: sticky;
  top: 0;
  align-self: start;
  max-height: 100vh;
  overflow-y: auto;
  z-index: 2;
}

.sidebar-head {
  padding: 0;
  flex-shrink: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 56px;
  padding: 0 1.25rem;
  font-weight: 600;
  border-bottom: 1px solid var(--sidebar-edge);
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--text);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  letter-spacing: -0.02em;
  flex-shrink: 0;
  transition: transform var(--t) var(--ease-out), box-shadow var(--t) var(--ease-soft);
}

.sidebar-head:hover .brand-mark {
  transform: scale(1.06);
  box-shadow: 0 6px 16px rgba(24, 24, 27, 0.15);
}

.brand-mark--wide {
  width: auto;
  min-width: 36px;
  padding: 0 0.4rem;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.brand-text {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user {
  padding: 14px 16px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--sidebar-edge);
}

.sidebar-user-name {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
}

.sidebar-user-role {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.4;
  opacity: 0.92;
}

.sidebar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.sidebar-action-form {
  margin: 0;
  display: inline;
}

.sidebar-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  line-height: 1.3;
  transition: background var(--t-fast) var(--ease-soft), color var(--t-fast) var(--ease-soft),
    transform var(--t-fast) var(--ease-out);
}

.sidebar-pill--accent {
  background: var(--surface-muted);
  color: var(--text);
  border: 1px solid var(--border);
}

.sidebar-pill--accent:hover {
  background: var(--text);
  color: #fff;
  border-color: var(--text);
  text-decoration: none;
}

.sidebar-pill--danger {
  background: #fee2e2;
  color: var(--danger);
}

.sidebar-pill--danger:hover {
  background: var(--danger);
  color: #fff;
}

.sidebar-pill:active {
  transform: scale(0.97);
}

.nav-search-wrap {
  padding: 10px 14px 12px;
  border-bottom: 1px solid var(--sidebar-edge);
  flex-shrink: 0;
  background: #fff;
}

.nav-search-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 40px;
  padding: 0 12px 0 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-muted);
  transition: border-color var(--t) var(--ease-soft), box-shadow var(--t) var(--ease-soft);
}

.nav-search-inner:hover {
  border-color: var(--border-strong);
}

.nav-search-inner:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-ring);
}

.nav-search-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.5;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2371717a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M21 21l-4.35-4.35'/%3E%3C/svg%3E") center / contain no-repeat;
}

.nav-search-input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: none;
  background: transparent;
  font: inherit;
  font-size: 13px;
  color: var(--text);
}

.nav-search-input::placeholder {
  color: #94a3b8;
}

.nav-search-input:focus {
  outline: none;
}

.nav-tree {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 4px 8px 16px;
  overflow: auto;
}

.nav-tree::-webkit-scrollbar {
  width: 3px;
}

.nav-tree::-webkit-scrollbar-thumb {
  background: #e0e3ed;
  border-radius: 2px;
}

.nav-branch {
  border-radius: var(--radius);
  position: relative;
  transition: background var(--t) var(--ease-soft);
}

.nav-branch.is-open {
  background: rgba(24, 24, 27, 0.028);
}

.nav-branch-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  margin: 0;
  border: none;
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
  color: var(--text);
  border-radius: var(--radius);
  border-left: 3px solid transparent;
  font-size: 13px;
  font-weight: 600;
  transition: background var(--t-fast) var(--ease-soft), color var(--t-fast) var(--ease-soft),
    border-color var(--t-fast) var(--ease-soft), transform var(--t-fast) var(--ease-out);
}

.nav-branch-toggle:active {
  transform: scale(0.985);
}

.nav-branch-toggle:hover {
  background: var(--surface-muted);
  color: var(--text);
}

.nav-branch-icon {
  font-size: 1.05rem;
  line-height: 1;
  width: 1.35rem;
  text-align: center;
  flex-shrink: 0;
}

.nav-branch-label {
  flex: 1;
  font-size: 13px;
  font-weight: 600;
}

.nav-branch-chevron {
  flex-shrink: 0;
  width: 1rem;
  text-align: center;
  color: #94a3b8;
  font-size: 0.95rem;
  line-height: 1;
  font-weight: 600;
}

.nav-branch-chevron::before {
  content: "›";
}

.nav-branch.is-open .nav-branch-chevron::before {
  content: "▾";
  font-size: 0.72rem;
  font-weight: 700;
}

.nav-branch-panel {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  padding: 0 6px;
  margin: 0 6px 0;
  background: var(--surface-muted);
  border-radius: var(--radius-sm);
  transition:
    max-height 0.4s var(--ease-out),
    opacity 0.26s var(--ease-soft),
    visibility 0s linear 0.4s,
    margin-bottom 0.32s var(--ease-out),
    padding-top 0.28s var(--ease-soft),
    padding-bottom 0.28s var(--ease-soft);
}

.nav-branch.is-open .nav-branch-panel {
  max-height: min(78vh, 640px);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  padding: 4px 6px 8px;
  margin: 0 6px 6px;
  transition:
    max-height 0.42s var(--ease-out),
    opacity 0.28s var(--ease-soft) 0.03s,
    visibility 0s linear 0s,
    margin-bottom 0.32s var(--ease-out),
    padding-top 0.28s var(--ease-soft),
    padding-bottom 0.28s var(--ease-soft);
}

.nav-leaf {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
  margin: 0;
  border-left: 2px solid transparent;
  transition: background var(--t-fast) var(--ease-soft), color var(--t-fast) var(--ease-soft),
    border-color var(--t-fast) var(--ease-soft), transform var(--t-fast) var(--ease-out);
}

.nav-leaf-icon {
  flex-shrink: 0;
  width: 1.15rem;
  height: 1.15rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  line-height: 0;
  transition: transform var(--t) var(--ease-out), color var(--t-fast) var(--ease-soft);
}

.nav-leaf-icon svg {
  display: block;
}

.nav-leaf-label {
  flex: 1;
  min-width: 0;
  line-height: 1.35;
}

.nav-leaf:hover {
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  transform: translate3d(2px, 0, 0);
}

.nav-leaf:hover .nav-leaf-icon {
  color: #475569;
  transform: scale(1.08);
}

.nav-leaf.is-active {
  color: var(--text);
  font-weight: 600;
  background: var(--surface);
  border-left-color: var(--accent);
  transform: none;
}

.nav-leaf.is-active .nav-leaf-icon {
  color: #334155;
  transform: none;
}

.nav-branch.is-active {
  background: transparent;
}

.nav-branch.is-active > .nav-branch-toggle {
  color: var(--text);
  background: var(--surface-muted);
  border-left-color: transparent;
}

.nav-branch.is-active > .nav-branch-toggle .nav-branch-label {
  color: var(--text);
}

.flash-ok {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  font-size: 13px;
  box-shadow: var(--shadow-sm);
  animation: zg-flash-in var(--t-slow) var(--ease-out) both;
}

@keyframes zg-flash-in {
  from {
    opacity: 0;
    transform: translate3d(0, -6px, 0);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

/* 兼容旧导航类名（独立页面若仍引用） */
.nav-item {
  display: block;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.95rem;
  transition: background var(--t-fast) var(--ease-soft), color var(--t-fast) var(--ease-soft);
}

.nav-item:hover {
  background: var(--primary-light);
  text-decoration: none;
}

.nav-item.is-active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}

.main {
  min-width: 0;
  padding: 0;
  width: 100%;
  overflow-x: hidden;
  background: var(--bg);
}

.main-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 28px 32px 48px;
  width: 100%;
}

/* 主区：块级内容依次上浮入场（不含 .flash，避免与提示条自身动画叠两层） */
@keyframes zg-stack-in {
  from {
    opacity: 0;
    transform: translate3d(0, 12px, 0);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .main-inner > *:not(.flash) {
    animation: zg-stack-in var(--t-slow) var(--ease-out) backwards;
  }

  .main-inner > *:not(.flash):nth-child(1) {
    animation-delay: 0.02s;
  }

  .main-inner > *:not(.flash):nth-child(2) {
    animation-delay: 0.05s;
  }

  .main-inner > *:not(.flash):nth-child(3) {
    animation-delay: 0.08s;
  }

  .main-inner > *:not(.flash):nth-child(4) {
    animation-delay: 0.11s;
  }

  .main-inner > *:not(.flash):nth-child(5) {
    animation-delay: 0.14s;
  }

  .main-inner > *:not(.flash):nth-child(6) {
    animation-delay: 0.17s;
  }

  .main-inner > *:not(.flash):nth-child(7) {
    animation-delay: 0.2s;
  }

  .main-inner > *:not(.flash):nth-child(8) {
    animation-delay: 0.23s;
  }

  .main-inner > *:not(.flash):nth-child(9) {
    animation-delay: 0.26s;
  }

  .main-inner > *:not(.flash):nth-child(10) {
    animation-delay: 0.29s;
  }

  .main-inner > *:not(.flash):nth-child(11) {
    animation-delay: 0.32s;
  }

  .main-inner > *:not(.flash):nth-child(12) {
    animation-delay: 0.35s;
  }
}

.page-head {
  margin-bottom: 1.5rem;
  padding-bottom: 0;
  border-bottom: none;
}

.page-head-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.page-head-inner .page-title {
  flex: 1 1 auto;
  min-width: 8rem;
}

.page-head-actions {
  flex: 0 0 auto;
}

.page-kicker {
  margin: 0 0 0.25rem;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.page-title {
  margin: 0;
  font-size: 1.375rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--text);
  line-height: 1.3;
}

.page-desc {
  margin: 0.35rem 0 0;
  max-width: 52rem;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.page-meta {
  margin: 0.35rem 0 0;
  font-size: 13px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  margin-bottom: 0.65rem;
  transition: color var(--t) var(--ease-soft), transform var(--t-fast) var(--ease-out);
}

.back-link:hover {
  color: var(--accent);
  text-decoration: none;
  transform: translate3d(-3px, 0, 0);
}

.list-meta-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
  font-variant-numeric: tabular-nums;
}

.list-meta-count {
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.125rem 1.25rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1rem;
  transition: box-shadow var(--t) var(--ease-soft), border-color var(--t-fast) var(--ease-soft),
    transform var(--t) var(--ease-out);
}

/* 统计卡 / 大表格外壳不整体上移；其余非表单卡片略浮起 */
.card:not(form):not(.stat-card):not(.table-wrap):hover {
  transform: translate3d(0, -2px, 0);
}

form.toolbar.card,
form.toolbar.card:hover {
  transform: none;
}

/* 列表页「共 N 条」条：略收紧内边距（单独 .list-meta-bar 的 padding 会被 .card 覆盖） */
.card.list-meta-bar {
  padding: 0.65rem 1rem;
}

.stat-card:hover {
  box-shadow: var(--shadow);
  transform: translate3d(0, -1px, 0);
}

form.toolbar.card:hover,
.card--prose:hover {
  box-shadow: var(--shadow);
}

.table-shell {
  padding: 0 !important;
  overflow: hidden;
}

.table-shell:hover {
  box-shadow: var(--shadow);
}

.card-title {
  margin: 0 0 1rem;
  font-size: 1.08rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.card-heading {
  margin: 0 0 0.85rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.card--prose {
  padding: 1.45rem 1.55rem;
}

.card--prose .prose {
  margin: 0;
}

form.toolbar.card {
  background: var(--surface);
  border-color: var(--border);
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.stack.tight {
  gap: 0.35rem;
}

.stack.narrow {
  max-width: 420px;
}

.card-stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* 问题反馈（memos）：三列卡片网格 + 状态色 */
.memo-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  align-items: stretch;
  margin-bottom: 1rem;
}

@media (max-width: 1100px) {
  .memo-board {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .memo-board {
    grid-template-columns: 1fr;
  }
}

.memo-empty-card {
  text-align: center;
  padding: 2rem 1.25rem;
}

.memo-card {
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  border-top: 3px solid var(--memo-accent, var(--border));
  padding-top: 1rem;
  transition: border-color var(--t-fast) var(--ease-soft), box-shadow var(--t-fast) var(--ease-soft);
}

.memo-card:hover {
  box-shadow: var(--shadow);
}

.memo-card--waiting {
  --memo-accent: #f59e0b;
}

.memo-card--in_progress {
  --memo-accent: #3b82f6;
}

.memo-card--completed {
  --memo-accent: #22c55e;
}

.memo-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.65rem;
  margin-bottom: 0.6rem;
}

.memo-card__meta {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.memo-card__id {
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.memo-card__player {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  word-break: break-word;
}

.memo-card__title {
  margin: 0 0 0.45rem;
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.35;
  color: var(--text);
}

.memo-card__body.log-body {
  flex: 1;
  min-height: 3.5rem;
  max-height: 7.5rem;
  overflow-y: auto;
  margin: 0 0 0.65rem;
  padding: 0.55rem 0.65rem;
  font-size: 0.86rem;
}

.memo-card__reply-hint {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  margin: 0 0 0.65rem;
  font-size: 0.78rem;
}

.memo-card__reply-hint.is-done .memo-card__reply-label {
  display: inline-block;
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.12);
  color: #1d4ed8;
  font-weight: 600;
}

.memo-card__foot {
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.memo-card-form {
  gap: 0.65rem !important;
}

.memo-card-form.stack.narrow,
.memo-card .stack.narrow {
  max-width: none;
}

.memo-pill--waiting {
  background: rgba(245, 158, 11, 0.16);
  color: #b45309;
  border-color: rgba(245, 158, 11, 0.4);
}

.memo-pill--in_progress {
  background: rgba(59, 130, 246, 0.14);
  color: #1d4ed8;
  border-color: rgba(59, 130, 246, 0.35);
}

.memo-pill--completed {
  background: rgba(34, 197, 94, 0.14);
  color: #15803d;
  border-color: rgba(34, 197, 94, 0.35);
}

.memo-card-status-select {
  font-weight: 600;
  border-width: 2px;
  transition: border-color var(--t) var(--ease-soft), background var(--t) var(--ease-soft);
}

.memo-card-status-select--waiting {
  border-color: rgba(245, 158, 11, 0.55);
  background: rgba(245, 158, 11, 0.06);
}

.memo-card-status-select--in_progress {
  border-color: rgba(59, 130, 246, 0.5);
  background: rgba(59, 130, 246, 0.06);
}

.memo-card-status-select--completed {
  border-color: rgba(34, 197, 94, 0.5);
  background: rgba(34, 197, 94, 0.06);
}

.stack-divided > * + * {
  border-top: 1px solid var(--border);
  padding-top: 1rem;
  margin-top: 1rem;
}

/* 可折叠区块（赞助统计排行、赞助目录分类列表等） */
.admin-disclosure {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-muted);
  overflow: hidden;
}

.admin-disclosure--flush {
  margin-top: 0.85rem;
}

.admin-disclosure__summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.7rem 0.95rem;
  font-weight: 600;
  font-size: 1.02rem;
  letter-spacing: -0.02em;
  color: var(--text);
  user-select: none;
  transition: background var(--t-fast) var(--ease-soft);
}

.admin-disclosure__summary:focus {
  outline: none;
}

.admin-disclosure__summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.admin-disclosure__summary:hover {
  background: rgba(255, 255, 255, 0.65);
}

.admin-disclosure__summary::-webkit-details-marker {
  display: none;
}

.admin-disclosure__summary::marker {
  content: "";
}

.admin-disclosure__lead {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
}

.admin-disclosure__title {
  line-height: 1.25;
}

.admin-disclosure__hint {
  font-weight: 500;
  font-size: 0.8125rem;
  color: var(--muted);
  line-height: 1.35;
}

.admin-disclosure__chevron {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 6px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  font-size: 0.65rem;
  line-height: 1;
  color: var(--muted);
  transition: transform var(--t) var(--ease-in-out), border-color var(--t-fast) var(--ease-soft),
    background var(--t-fast) var(--ease-soft), color var(--t-fast) var(--ease-soft);
}

.admin-disclosure[open] .admin-disclosure__chevron {
  transform: rotate(90deg);
}

.admin-disclosure__body {
  padding: 0 0.95rem 0.95rem;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.field.inline {
  flex-direction: row;
  align-items: center;
  gap: 0.65rem;
}

.field.inline.grow {
  flex: 1;
}

.field-label {
  font-size: 0.85rem;
  color: var(--muted);
  min-width: 3rem;
}

.input {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.65rem;
  font: inherit;
  background: var(--surface);
  width: 100%;
  transition: border-color var(--t-fast) var(--ease-soft), box-shadow var(--t-fast) var(--ease-soft),
    background var(--t-fast) var(--ease-soft);
}

.input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-ring);
}

textarea.input {
  min-height: 5.5rem;
  resize: vertical;
  line-height: 1.5;
}

select.input {
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  line-height: 1.4;
  padding-top: 0.48rem;
  padding-bottom: 0.48rem;
  padding-right: 2.55rem;
  border-color: #cbd5e1;
  background-color: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75), 0 1px 2px rgba(15, 23, 42, 0.06);
  background-image:
    linear-gradient(45deg, transparent 50%, #334155 50%),
    linear-gradient(135deg, #334155 50%, transparent 50%),
    linear-gradient(to right, #cbd5e1, #cbd5e1);
  background-position:
    calc(100% - 1.08rem) calc(50% - 0.14rem),
    calc(100% - 0.74rem) calc(50% - 0.14rem),
    calc(100% - 2.05rem) 50%;
  background-size:
    0.38rem 0.38rem,
    0.38rem 0.38rem,
    1px 1.35rem;
  background-repeat: no-repeat;
}

select.input:hover {
  border-color: #94a3b8;
  background-color: #f8fafc;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82), 0 2px 8px rgba(51, 65, 85, 0.12);
}

select.input:focus {
  background-color: #ffffff;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-ring), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

select.input:disabled {
  cursor: not-allowed;
  color: #9ca3af;
  background-color: #f3f4f6;
  background-image:
    linear-gradient(45deg, transparent 50%, #9ca3af 50%),
    linear-gradient(135deg, #9ca3af 50%, transparent 50%),
    linear-gradient(to right, #e5e7eb, #e5e7eb);
}

/* Native dropdown list styling (effective range depends on browser/OS). */
select.input option {
  color: #0f172a;
  background: #f8fafc;
  font-size: 15px;
  line-height: 1.65;
  padding: 0.45rem 0.65rem;
}

select.input option:checked,
select.input option:hover {
  color: #0b1220;
  background: #dbeafe;
}

select.input optgroup {
  color: #334155;
  background: #e2e8f0;
  font-weight: 700;
  font-size: 13px;
}

.btn {
  border-radius: var(--radius-sm);
  padding: 0.45rem 1rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  background: var(--surface-muted);
  color: var(--text);
  border: 1px solid var(--border);
  transition: background var(--t-fast) var(--ease-soft), transform var(--t-fast) var(--ease-out),
    box-shadow var(--t-fast) var(--ease-soft), border-color var(--t-fast) var(--ease-soft);
}

.btn:hover {
  background: #eef0f2;
}

.btn:active {
  transform: translate3d(0, 1px, 0) scale(0.98);
}

.btn.secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border-strong);
}

.btn.secondary:hover {
  background: var(--surface-muted);
  border-color: var(--border-strong);
}

.btn.primary {
  background: var(--text);
  color: #fff;
  border-color: var(--text);
  box-shadow: var(--shadow-sm);
  transition: background var(--t-fast) var(--ease-soft), border-color var(--t-fast) var(--ease-soft),
    transform var(--t-fast) var(--ease-out), box-shadow var(--t) var(--ease-soft);
}

.btn.primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  text-decoration: none;
  transform: translate3d(0, -1px, 0);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.12);
}

.btn.primary:active {
  transform: translate3d(0, 0, 0) scale(0.98);
}

.btn.sm {
  padding: 0.38rem 0.85rem;
  font-size: 0.85rem;
  min-height: 2.125rem;
}

.btn.full {
  width: 100%;
}

.link-btn {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: var(--accent);
  cursor: pointer;
}

.link-btn.danger {
  color: var(--danger);
}

.toolbar {
  margin-bottom: 1rem;
}

.toolbar-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  align-items: flex-end;
}

.toolbar-row--follow {
  margin-top: 0.65rem;
}

.toolbar-per-page {
  margin-left: auto;
}

form.toolbar.card {
  margin-bottom: 1.15rem;
  padding: 1.25rem 1.35rem;
}

.grid {
  display: grid;
  gap: 1.1rem;
}

.stats-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-bottom: 1.65rem;
}

.dash-bridge-overview {
  margin-bottom: 1.65rem;
}

.dash-status-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.65rem;
}

.dash-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: var(--surface-muted);
  font-size: 0.85rem;
}

.dash-chip-label {
  color: var(--muted);
}

.dash-chip-num {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* 首页：会议桌入口 + 代办 */
.dash-meeting-banner {
  display: grid;
  grid-template-columns: minmax(200px, 0.9fr) minmax(260px, 1.35fr);
  gap: 1rem;
  margin-bottom: 1.65rem;
  align-items: stretch;
}

.dash-workbench-split {
  display: grid;
  grid-template-columns: 1fr;
  min-height: 11rem;
  padding: 0;
  overflow: hidden;
}

.dash-workbench-split--duo {
  grid-template-columns: 1fr 1fr;
}

.dash-workbench-half {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  text-decoration: none;
  color: inherit;
  padding: 2rem 1.25rem;
  min-height: 11rem;
  transition: background var(--t) var(--ease-soft), box-shadow var(--t) var(--ease-soft);
}

.dash-workbench-half--anticheat {
  border-left: 1px solid var(--border);
}

.dash-workbench-half:hover {
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px var(--accent);
  text-decoration: none;
  color: inherit;
}

.dash-workbench-half--anticheat:hover {
  background: rgba(220, 38, 38, 0.06);
  box-shadow: inset 0 0 0 1px rgba(220, 38, 38, 0.35);
}

.dash-meeting-hero-kicker {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.dash-meeting-hero-title {
  font-size: clamp(1.65rem, 4vw, 2.35rem);
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.15;
  margin-bottom: 0.5rem;
}

.dash-meeting-hero-count {
  font-size: clamp(2.5rem, 7vw, 3.75rem);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  color: var(--accent);
  margin-bottom: 0.35rem;
}

.dash-meeting-hero-count--alert {
  color: var(--danger);
}

.dash-meeting-hero-sub {
  font-size: 0.85rem;
}

.dash-meeting-todo {
  padding: 1.1rem 1.15rem 1.15rem;
  min-width: 0;
}

.dash-meeting-todo-title {
  margin: 0 0 0.65rem;
  font-size: 1rem;
  font-weight: 700;
}

.dash-meeting-todo-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.dash-meeting-todo-item + .dash-meeting-todo-item {
  border-top: 1px solid var(--border);
}

.dash-meeting-todo-link {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 0.65rem;
  row-gap: 0.15rem;
  padding: 0.55rem 0.35rem;
  margin: 0 -0.35rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: inherit;
  align-items: baseline;
  transition: background var(--t-fast) var(--ease-soft);
}

.dash-meeting-todo-link:hover {
  background: rgba(24, 24, 27, 0.04);
}

.dash-meeting-todo-link:hover .dash-meeting-todo-name {
  color: var(--accent);
}

.dash-meeting-todo-id {
  grid-row: 1 / span 2;
  font-size: 0.78rem;
  color: var(--muted);
}

.dash-meeting-todo-name {
  font-weight: 600;
  font-size: 0.9rem;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color var(--t-fast) var(--ease-soft);
}

.dash-meeting-todo-meta {
  grid-column: 2;
}

@media (max-width: 720px) {
  .dash-meeting-banner {
    grid-template-columns: 1fr;
  }

  .dash-workbench-split--duo {
    grid-template-columns: 1fr;
  }

  .dash-workbench-half--anticheat {
    border-left: none;
    border-top: 1px solid var(--border);
  }

  .dash-workbench-half {
    min-height: 9rem;
    padding: 1.5rem 1rem;
  }
}

.dash-quicklinks {
  margin-bottom: 1.65rem;
}

.dash-quick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.65rem;
}

.dash-quick-item {
  display: block;
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: border-color var(--t) var(--ease-soft), background var(--t) var(--ease-soft),
    box-shadow var(--t) var(--ease-soft), transform var(--t-fast) var(--ease-out);
}

.dash-quick-item:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
  transform: translate3d(0, -1px, 0);
}

.dash-snapshot {
  margin-bottom: 1.65rem;
}

.dash-snapshot-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 1.1rem 1.35rem;
  align-items: start;
}

.dash-snapshot-grid--single {
  grid-template-columns: minmax(0, 1fr);
}

.dash-snapshot-heading {
  margin: 0 0 0.6rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.dash-chip--link {
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--border);
  transition: border-color var(--t-fast) var(--ease-soft), background var(--t-fast) var(--ease-soft);
}

.dash-chip--link:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  text-decoration: none;
}

.dash-snapshot-col--aside {
  padding: 0.15rem 0 0;
  border-left: 1px solid var(--border);
  padding-left: 1.15rem;
}

.dash-snapshot-grid--single .dash-snapshot-col--aside {
  border-left: none;
  padding-left: 0;
  padding-top: 0;
}

.dash-aside-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.35rem 0.75rem;
  margin-bottom: 0.5rem;
}

.dash-aside-row:last-child {
  margin-bottom: 0;
}

.dash-aside-label {
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 500;
}

.dash-aside-value {
  font-size: 0.9rem;
  font-weight: 600;
  text-align: right;
}

.dash-aside-value a {
  font-weight: inherit;
}

.stat-value--cfx {
  font-size: 1.78rem;
  letter-spacing: -0.03em;
}

.dash-srv-panel {
  margin-top: 0.55rem;
  display: flex;
  flex-direction: column;
  gap: 0.38rem;
  padding-top: 0.55rem;
  border-top: 1px solid var(--border);
}

.dash-srv-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.65rem;
  font-size: 0.8125rem;
  line-height: 1.35;
}

.dash-srv-row--wrap {
  align-items: flex-start;
}

.dash-srv-k {
  flex-shrink: 0;
  color: var(--muted);
  font-weight: 500;
}

.dash-srv-v {
  font-weight: 600;
  text-align: right;
  min-width: 0;
}

.dash-srv-v.is-online {
  color: #15803d;
}

.dash-srv-v.is-online.is-partial {
  color: #b45309;
}

.dash-srv-v.is-offline {
  color: #b91c1c;
  font-weight: 600;
}

@media (max-width: 720px) {
  .dash-snapshot-grid {
    grid-template-columns: 1fr;
  }

  .dash-snapshot-col--aside {
    border-left: none;
    padding-left: 0;
    padding-top: 0.65rem;
    border-top: 1px solid var(--border);
  }

  .dash-snapshot-grid--single .dash-snapshot-col--aside {
    border-top: none;
    padding-top: 0;
  }
}

.dash-perm-hint {
  margin-top: 1rem;
  margin-bottom: 0;
}

.dash-perm-hint strong {
  font-weight: 700;
}

.stat-card {
  position: relative;
  min-height: 96px;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem 1.35rem;
  overflow: hidden;
  transition: box-shadow var(--t) var(--ease-soft), border-color var(--t-fast) var(--ease-soft),
    transform var(--t) var(--ease-out);
}

.stat-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  border-radius: 4px 0 0 4px;
  opacity: 0.95;
}

.stat-card--blue::before {
  background: var(--accent);
}

.stat-card--violet::before {
  background: #71717a;
}

.stat-card--amber::before {
  background: #a1a1aa;
}

.stat-card--teal::before {
  background: #0d9488;
}

.stat-card--rose::before {
  background: #e11d48;
}

.stat-card-icon {
  font-size: 1.65rem;
  line-height: 1;
  width: 2.75rem;
  height: 2.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--surface-muted);
  flex-shrink: 0;
}

.stat-card--blue .stat-card-icon {
  background: var(--accent-soft);
}

.stat-card--violet .stat-card-icon {
  background: #f4f4f5;
}

.stat-card--amber .stat-card-icon {
  background: #f4f4f5;
}

.stat-card--teal .stat-card-icon {
  background: rgba(13, 148, 136, 0.12);
}

.stat-card--rose .stat-card-icon {
  background: rgba(225, 29, 72, 0.1);
}

.stat-body {
  flex: 1;
  min-width: 0;
}

.stat-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.stat-value {
  font-size: 2.05rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  margin-top: 0.2rem;
  color: var(--text);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.stat-value--sm {
  font-size: 1.65rem;
}

.stat-hint {
  margin-top: 0.15rem;
  font-size: 0.78rem;
  color: var(--muted);
}

.prose {
  font-size: 0.96rem;
  color: var(--muted);
  line-height: 1.65;
}

.prose h2,
.prose h3 {
  color: var(--text);
  margin-top: 0;
}

.table-wrap {
  overflow-x: auto;
  margin: 0;
}

.table-detailed {
  font-size: 0.875rem;
}

.table-detailed th,
.table-detailed td {
  vertical-align: top;
}

.col-id {
  white-space: nowrap;
  width: 4rem;
}

.col-thumb {
  width: 88px;
  text-align: center;
}

.thumb-link {
  display: inline-block;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  line-height: 0;
}

.thumb-img {
  display: block;
  width: 80px;
  height: 52px;
  object-fit: cover;
  background: #f1f5f9;
}

.cell-main {
  font-weight: 500;
  max-width: 140px;
}

.cell-wrap {
  max-width: 220px;
  word-break: break-word;
}

.cell-summary {
  max-width: 420px;
  font-size: 0.82rem;
  color: var(--muted);
}

.col-actions {
  width: 4rem;
}

.col-pos {
  max-width: 10rem;
}

.col-change {
  max-width: 14rem;
}

.table-logs {
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.table th,
.table td {
  padding: 0.72rem 0.85rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.table thead {
  background: var(--surface-muted);
}

.table thead th {
  border-bottom: 1px solid var(--border-strong);
}

.table tbody tr {
  transition: background var(--t) var(--ease-soft);
}

.table tbody tr:hover {
  background: rgba(24, 24, 27, 0.028);
}

.table tbody tr:last-child td {
  border-bottom: none;
}

.table th {
  color: var(--muted);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 0.85rem;
}

.tiny {
  display: block;
  font-size: 0.7rem;
  color: var(--muted);
}

.center {
  text-align: center;
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-variant-numeric: tabular-nums;
}

.pill {
  display: inline-block;
  padding: 0.2rem 0.62rem;
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 600;
  border: 1px solid var(--border);
}

.pill.ok {
  background: rgba(22, 163, 74, 0.12);
  color: #15803d;
}

.pill.warn {
  background: rgba(245, 158, 11, 0.18);
  color: #b45309;
}

.pill.danger {
  background: rgba(220, 38, 38, 0.14);
  color: #b91c1c;
}

.pager {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 1rem 0;
}

.pager-link {
  padding: 0.4rem 0.78rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.85rem;
  transition: background var(--t-fast) var(--ease-soft), border-color var(--t-fast) var(--ease-soft),
    transform var(--t-fast) var(--ease-out), box-shadow var(--t-fast) var(--ease-soft);
}

.pager-link:hover {
  transform: translate3d(0, -1px, 0);
  border-color: var(--accent);
  background: var(--accent-soft);
  text-decoration: none;
}

.pager-link.is-current {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-hover);
}

.pager-full {
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin: 1rem 0;
}

.pager-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.pager-summary {
  flex: 1;
  min-width: 200px;
}

.pager-edge.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: var(--bg);
}

.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 2rem 2.25rem;
  box-shadow: var(--shadow);
}

.auth-brand {
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
}

.auth-sub {
  margin: 0.25rem 0 1.5rem;
  color: var(--muted);
  font-size: 13px;
}

.flash {
  padding: 0.7rem 1rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  font-size: 0.9rem;
  line-height: 1.45;
}

.flash-error {
  background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
  color: #b91c1c;
  border: 1px solid #fecaca;
  box-shadow: var(--shadow-sm);
  animation: zg-flash-in var(--t-slow) var(--ease-out) both;
}

.flash-warn {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  color: #92400e;
  border: 1px solid #fde68a;
  box-shadow: var(--shadow-sm);
  animation: zg-flash-in var(--t-slow) var(--ease-out) both;
}

.user-cards {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.user-card {
  transition: box-shadow var(--t) var(--ease-soft), border-color var(--t) var(--ease-soft),
    transform var(--t-fast) var(--ease-out);
}

.user-card:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translate3d(0, -1px, 0);
}

.user-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.user-email {
  font-weight: 600;
}

.user-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.role-grid,
.perm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.35rem 0.75rem;
}

.perm-block {
  margin-bottom: 1rem;
}

.perm-module {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.check {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
}

.role-card-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.perm-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-end;
}

.inline-form {
  display: inline;
}

.inline-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: rgba(241, 245, 249, 0.95);
  padding: 0.12rem 0.4rem;
  border-radius: 6px;
  font-size: 0.84em;
  border: 1px solid var(--border);
}

.block-code {
  display: block;
  margin-top: 0.5rem;
  padding: 0.75rem;
  background: #0f172a;
  color: #e2e8f0;
  border-radius: 8px;
  word-break: break-all;
  font-size: 0.85rem;
}

.ellipsis {
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.checkbox-cell {
  width: 2rem;
}

.table-link {
  font-weight: 600;
  color: var(--accent);
}

.nowrap {
  white-space: nowrap;
}

.btn.danger-outline {
  background: #fff;
  border: 1px solid rgba(220, 38, 38, 0.45);
  color: var(--danger);
}

.btn.danger-outline:hover {
  background: #fef2f2;
  border-color: var(--danger);
}

.log-body {
  margin: 0;
  padding: 1.1rem 1.2rem;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  line-height: 1.58;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.injury-layout {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  align-items: flex-start;
}

.injury-doll {
  width: 140px;
  height: auto;
  flex-shrink: 0;
}

.injury-doll--compact {
  width: 52px;
  height: auto;
  display: block;
  margin: 0 auto;
}

.col-doll {
  width: 4.5rem;
  vertical-align: middle;
}

.cell-doll {
  text-align: center;
}

.cell-doll .tiny {
  display: block;
  margin-top: 0.15rem;
  max-width: 4.5rem;
}

.injury-meta {
  flex: 1;
  min-width: 200px;
  font-size: 0.95rem;
}

.screenshot-frame {
  margin-top: 0.85rem;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border-strong);
  max-width: 960px;
  background: #0f172a;
  box-shadow: var(--shadow-sm);
}

.screenshot-frame img {
  display: block;
  width: 100%;
  height: auto;
}

.screenshot-link {
  word-break: break-all;
  font-size: 0.85rem;
}

.back-row {
  margin: 0 0 0.5rem;
}

.roles-toolbar {
  padding: 0.85rem 1.1rem;
  margin-bottom: 1rem;
}

.roles-toolbar-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.65rem;
}

.roles-new-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin-bottom: 1.15rem;
}

.roles-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 1.1rem;
  align-items: start;
}

.website-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
  gap: 1.1rem;
  align-items: start;
  margin-bottom: 1rem;
}

.roles-col {
  margin-bottom: 0;
}

.roles-col .table {
  font-size: 12px;
}

.roles-col--roles .stack {
  gap: 0.85rem;
}

.role-group-card {
  margin-bottom: 0;
  box-shadow: var(--shadow-sm);
}

.role-inline-delete {
  display: inline;
  margin: 0 0 0 0.35rem;
}

.role-inline-delete button {
  vertical-align: middle;
}

.role-edit-modal {
  width: min(640px, calc(100vw - 2rem));
  max-height: min(90vh, 900px);
  padding: 0;
  margin: auto;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  background: var(--surface);
  color: var(--text);
}

.role-edit-modal--wide {
  width: min(920px, calc(100vw - 2rem));
}

.role-edit-modal::backdrop {
  background: rgba(15, 23, 42, 0.45);
}

@media (prefers-reduced-motion: no-preference) {
  .role-edit-modal[open] {
    animation: roleModalIn var(--t) var(--ease-out) both;
  }
}

@keyframes roleModalIn {
  from {
    opacity: 0;
    transform: translate3d(0, 10px, 0) scale(0.985);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

.role-edit-modal-inner {
  display: flex;
  flex-direction: column;
  max-height: min(90vh, 900px);
  min-height: 0;
  overflow: hidden;
}

/* 弹窗主体可滚动区（多图管理：图集 + 底部表单） */
.role-edit-modal-scroll {
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 0.75rem 1rem 0;
  -webkit-overflow-scrolling: touch;
}

.role-edit-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
}

.role-edit-modal-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.role-edit-modal-form {
  padding: 1rem;
  overflow: auto;
  flex: 1;
  min-height: 0;
}

.perm-block-modal {
  border-top: 1px solid var(--border);
  padding-top: 0.75rem;
}

.perm-nav-tree .perm-nav-l1 {
  margin-bottom: 0.35rem;
}

.perm-nav-tree .perm-nav-l1 .admin-disclosure__body {
  padding-top: 0.25rem;
}

.perm-nav-l2 {
  margin: 0 0 0.75rem;
  padding-left: 0.5rem;
  border-left: 2px solid var(--border);
}

.perm-nav-l2:last-child {
  margin-bottom: 0;
}

.perm-nav-l2-head {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
}

.perm-nav-note {
  margin: 0.2rem 0 0.4rem;
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--muted);
}

.perm-grid--nav {
  margin-top: 0.35rem;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.45rem 0.65rem;
}

.perm-grid--nav .check {
  align-items: flex-start;
  gap: 0.45rem;
  padding: 0.4rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(248, 250, 252, 0.85);
  line-height: 1.35;
  min-width: 0;
}

.perm-grid--nav .check input[type="checkbox"] {
  flex-shrink: 0;
  margin-top: 0.15rem;
}

.perm-grid--nav .check .check-label {
  flex: 1;
  min-width: 0;
  word-break: break-word;
}

.perm-grid--nav .check .mono.tiny {
  flex-shrink: 0;
  max-width: 42%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  align-self: center;
}

/* 重要操作：桥接审核项多列卡片 */
.important-ops-form .important-ops-groups {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.important-ops-form fieldset.important-ops-fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}

.important-ops-form fieldset.important-ops-fieldset > legend {
  padding: 0;
  margin: 0 0 0.5rem;
}

.important-ops-form .important-ops-items {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 0.65rem 0.85rem;
  align-items: stretch;
}

.important-ops-form .important-ops-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.45rem 0.65rem;
  align-items: center;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(248, 250, 252, 0.85);
  min-width: 0;
}

.important-ops-form .important-ops-item .important-ops-check {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  margin: 0;
  min-width: 0;
}

.important-ops-form .important-ops-item .important-ops-check input[type="checkbox"] {
  flex-shrink: 0;
  margin-top: 0.2rem;
}

.important-ops-form .important-ops-item .important-ops-votes {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  white-space: nowrap;
  font-size: 0.82rem;
  color: var(--muted);
}

.important-ops-form .important-ops-item .important-ops-votes .input.sm {
  width: 3.5rem;
}

.role-edit-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
  margin-top: 0.5rem;
}

/* 赞助人员管理：主表 + 名下项目展开（旧后台图一风格） */
.donor-row-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  vertical-align: middle;
}

.donor-row-actions .btn {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
}

.donor-row-actions .btn-ico {
  display: inline-flex;
  flex-shrink: 0;
  width: 0.95rem;
  height: 0.95rem;
}

.donor-row-actions .btn-ico svg {
  display: block;
  width: 100%;
  height: 100%;
}

.btn--donor-expand {
  background: #1f2937;
  color: #fff;
  border-color: #1f2937;
}

.btn--donor-expand:hover {
  filter: brightness(1.08);
}

.btn--donor-edit {
  background: #2563eb;
  color: #fff;
  border-color: #2563eb;
}

.btn--donor-edit:hover {
  filter: brightness(1.06);
}

.btn--donor-del {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

.btn--donor-del:hover {
  background: #fee2e2;
  border-color: #fca5a5;
}

.donor-inline-form {
  display: inline;
  margin: 0;
}

.donor-inline-form button {
  margin: 0;
}

.donor-avatar {
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border);
  vertical-align: middle;
}

tr.donor-nested-row > td {
  padding: 0;
  background: var(--surface-muted, #f8fafc);
  border-top: none;
}

.donor-nested-inner {
  padding: 0.85rem 1rem 1rem 1.35rem;
  border-top: 1px dashed var(--border);
}

.donor-nested-title {
  margin: 0 0 0.65rem;
  font-size: 0.95rem;
  font-weight: 600;
}

.donor-nested-table {
  font-size: 0.875rem;
}

.donor-nested-table .donor-row-actions .btn {
  padding: 0.2rem 0.45rem;
  font-size: 0.8rem;
}

/* 赞助物品列表（对齐旧 fivem 后台 sponsor-catalog） */
.catalog-admin-card {
  margin-bottom: 1rem;
}

.catalog-section-head .card-title {
  font-size: 1.05rem;
}

.catalog-search-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: flex-end;
  margin-top: 0.85rem;
}

.catalog-search-meta {
  align-self: center;
  white-space: nowrap;
}

.catalog-batch-toolbar {
  margin-top: 1rem;
  margin-bottom: 0;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-muted, #f8fafc);
}

.catalog-admin-table .catalog-preview-wrap {
  position: relative;
  display: inline-block;
}

.catalog-preview-thumb {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border);
  vertical-align: middle;
}

.catalog-img-count {
  position: absolute;
  right: -4px;
  bottom: -4px;
  background: #334155;
  color: #fff;
  font-size: 10px;
  padding: 2px 5px;
  border-radius: 6px;
  line-height: 1.2;
}

.catalog-image-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
  margin-top: 0.75rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-muted, #f8fafc);
}

.catalog-edit-images {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.35rem;
}

.catalog-edit-img-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  padding: 0.45rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface, #fff);
}

.catalog-images-modal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 0.75rem;
  margin: 0;
  min-height: 4rem;
}

.catalog-images-modal-empty {
  margin: 0;
  padding: 1rem 0.25rem;
  text-align: center;
  font-size: 0.875rem;
  color: var(--muted);
  grid-column: 1 / -1;
}

.catalog-images-modal-tile {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  align-items: stretch;
  padding: 0.55rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-muted);
}

.catalog-images-modal-tile img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
}

.catalog-images-modal-tile-meta {
  font-size: 0.72rem;
  line-height: 1.35;
  word-break: break-all;
  color: var(--muted);
  max-height: 3.2rem;
  overflow: hidden;
}

.catalog-images-modal-tile-note {
  margin: 0;
  font-size: 0.78rem;
  color: var(--muted);
}

.catalog-images-modal-tile-actions {
  margin-top: auto;
  padding-top: 0.25rem;
}

.catalog-images-modal-tile-actions .btn {
  width: 100%;
  justify-content: center;
}

.catalog-images-modal-tile-actions .donor-inline-form {
  display: block;
  width: 100%;
}

/* 多图弹窗底部上传区 */
.catalog-images-dialog-footer {
  margin: 0;
  padding: 0.85rem 1rem 1rem;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
  background: var(--surface);
}

.catalog-images-dialog-footer.stack.narrow {
  max-width: none;
}

/* 官网内容 hub：四宫格入口（不用 stat-card + a 混排） */
.website-hub-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1.65rem;
}

.website-hub-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  min-height: 7.5rem;
  padding: 1.15rem 1.2rem 1.15rem 1.35rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
  transition: border-color var(--t-fast) var(--ease-soft), box-shadow var(--t) var(--ease-soft),
    transform var(--t-fast) var(--ease-out);
}

.website-hub-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  border-radius: 4px 0 0 4px;
  opacity: 0.95;
}

.website-hub-card--blue::before {
  background: var(--accent);
}

.website-hub-card--teal::before {
  background: #0d9488;
}

.website-hub-card--amber::before {
  background: #d97706;
}

.website-hub-card--violet::before {
  background: #71717a;
}

.website-hub-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow);
  transform: translate3d(0, -2px, 0);
  text-decoration: none;
  color: inherit;
}

.website-hub-card-kicker {
  margin: 0 0 0.35rem;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.website-hub-card-title {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.3;
  color: var(--text);
}

.website-hub-card-desc {
  margin: 0.45rem 0 0;
  font-size: 0.85rem;
  line-height: 1.45;
  color: var(--muted);
}

@media (max-width: 1100px) {
  .website-hub-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .website-hub-grid {
    grid-template-columns: 1fr;
  }
}

input.input.is-readonly,
.input[readonly] {
  background: var(--surface-muted, #f8fafc);
  color: var(--muted, #64748b);
}

.roles-inline-edit summary {
  cursor: pointer;
  list-style: none;
}

.roles-inline-edit summary::-webkit-details-marker {
  display: none;
}

.roles-inline-form {
  margin-top: 0.65rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--border);
}

.nav-branch-icon svg {
  display: block;
  width: 18px;
  height: 18px;
  opacity: 0.85;
}

.nav-branch.is-active .nav-branch-icon svg,
.nav-branch-toggle:hover .nav-branch-icon svg {
  opacity: 1;
}

.comp-tabbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.5rem !important;
  border-radius: var(--radius) !important;
  background: var(--surface-muted) !important;
  border: 1px solid var(--border) !important;
}

.comp-tab {
  border-radius: var(--radius-sm) !important;
  font-weight: 500 !important;
}

.comp-tab.is-active {
  background: var(--surface) !important;
  color: var(--text) !important;
  border-color: var(--border-strong) !important;
  box-shadow: var(--shadow-sm);
}

.plate-tabbar {
  padding: 0.5rem !important;
  border-radius: var(--radius) !important;
  background: var(--surface-muted) !important;
  border: 1px solid var(--border) !important;
}

.plate-tab.is-active {
  background: var(--surface) !important;
  color: var(--text) !important;
  border-color: var(--border-strong) !important;
  box-shadow: var(--shadow-sm);
}

@media (max-width: 960px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    flex-direction: column;
    min-height: auto;
    position: static;
    max-height: none;
    overflow: visible;
    border-right: none;
    border-bottom: 1px solid var(--border-strong);
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
  }

  .main-inner {
    padding: 1.15rem 1rem 2.5rem;
  }

  .page-title {
    font-size: 1.45rem;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .roles-split {
    grid-template-columns: 1fr;
  }

  .website-split {
    grid-template-columns: 1fr;
  }

  .roles-toolbar-inner {
    flex-direction: column;
    align-items: stretch;
  }

  .roles-toolbar-inner .btn {
    width: 100%;
    justify-content: center;
  }
}

/* ---------- 玩家详情 ---------- */
.player-detail-body.roles-split {
  margin-bottom: 0;
  align-items: start;
}

.player-detail-body .roles-col {
  min-width: 0;
}

.player-detail-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  justify-content: flex-end;
}

.page-head-inner .player-detail-toolbar form {
  display: inline;
  margin: 0;
}

.page-desc .player-detail-badge {
  margin-right: 0.45rem;
  vertical-align: middle;
}

.player-detail-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  background: #ecfdf5;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.player-detail-info-card {
  overflow: hidden;
}

.player-detail-hero {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: -0.25rem -1.05rem 1.1rem;
  padding: 1.15rem 1.25rem 1.2rem;
  background: linear-gradient(135deg, var(--accent-soft) 0%, #f4f4f5 55%, var(--surface-muted) 100%);
  border-bottom: 1px solid var(--border);
}

.player-detail-hero-avatar {
  flex: 0 0 auto;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--accent);
  background: var(--surface);
  border: 1px solid var(--accent-ring);
  box-shadow: var(--shadow-sm);
}

.player-detail-hero-main {
  min-width: 0;
}

.player-detail-hero-name {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.25;
}

.player-detail-hero-meta {
  margin-top: 0.25rem;
  font-size: 13px;
  color: var(--muted);
}

.player-detail-dot {
  margin: 0 0.2rem;
  opacity: 0.55;
}

.player-detail-hero-job {
  margin-top: 0.45rem;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  opacity: 0.92;
}

.player-stat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 1.15rem;
}

.player-chip {
  flex: 1 1 7.5rem;
  min-width: 6.5rem;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-muted);
  box-shadow: var(--shadow-sm);
}

.player-chip-k {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.2rem;
}

.player-chip-v {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

.player-chip--cash .player-chip-v {
  color: #15803d;
}

.player-chip--bank .player-chip-v {
  color: #1d4ed8;
}

.player-chip--veh .player-chip-v {
  color: var(--text);
}

.player-detail-info-card .player-detail-card-head {
  margin-bottom: 0.85rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--border);
}

.player-detail-info-card .player-detail-card-head .card-title {
  margin-bottom: 0;
  font-size: 1rem;
}

.player-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem 0.85rem;
}

.player-info-grid--cells .player-info-item {
  padding: 0.55rem 0.7rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-muted);
}

@media (max-width: 520px) {
  .player-info-grid {
    grid-template-columns: 1fr;
  }
}

.player-info-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}

.player-info-k {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--muted);
}

.player-info-v {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  word-break: break-word;
}

.player-info-item--full {
  grid-column: 1 / -1;
}

.player-detail-section {
  margin-top: 1.15rem;
  padding-top: 1.05rem;
  border-top: 1px solid var(--border);
}

.player-detail-section .card-heading {
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
}

.player-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem 1rem;
}

@media (max-width: 640px) {
  .player-stat-grid {
    grid-template-columns: 1fr;
  }
}

.player-detail-actions-col .player-action-stack .card {
  margin-bottom: 0;
}

.player-stat-block {
  margin-bottom: 0;
}

.player-stat-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.4rem;
}

.player-stat-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.player-stat-pct {
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

.player-stat-rail {
  padding: 5px 6px;
  border-radius: 8px;
  background: rgba(24, 24, 27, 0.04);
  border: 1px solid var(--border);
}

.player-stat-bar {
  display: flex;
  gap: 2px;
  height: 10px;
  align-items: stretch;
}

.player-stat-seg {
  flex: 1;
  min-width: 2px;
  border-radius: 2px;
  background: rgba(228, 228, 231, 0.95);
  transition: background var(--t-fast) var(--ease-soft);
}

.player-stat-seg.is-on {
  background: var(--accent);
}

.player-stat-bar--health .player-stat-seg.is-on {
  background: #22c55e;
}

.player-stat-bar--armor .player-stat-seg.is-on {
  background: #64748b;
}

.player-stat-bar--hunger .player-stat-seg.is-on {
  background: #ea580c;
}

.player-stat-bar--thirst .player-stat-seg.is-on {
  background: #2563eb;
}

.player-stat-bar--stress .player-stat-seg.is-on {
  background: #a855f7;
}

.player-id-box {
  margin-top: 0;
  padding: 0.75rem 0.85rem;
  border-radius: var(--radius-sm);
  background: #fafafa;
  border: 1px solid var(--border-strong);
  max-height: 200px;
  overflow: auto;
}

.player-id-box pre {
  margin: 0;
  font-size: 11px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-all;
  color: #52525b;
}

.player-detail-callout {
  margin-top: 1rem;
  padding: 0.65rem 0.85rem;
  font-size: 13px;
  line-height: 1.5;
  color: #713f12;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: var(--radius-sm);
}

.player-detail-callout code {
  font-size: 12px;
}

.player-action-stack {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.player-action-group--primary {
  border-color: rgba(37, 99, 235, 0.22);
  box-shadow: 0 4px 20px rgba(37, 99, 235, 0.06);
}

.player-action-group .card-title {
  font-size: 1.02rem;
  margin-bottom: 0.35rem;
}

.player-action-lead {
  margin: 0 0 0.85rem;
  font-size: 13px;
  line-height: 1.45;
}

.player-model-box {
  margin-bottom: 1rem;
  padding: 0.75rem 0.85rem;
  border-radius: var(--radius-sm);
  background: var(--surface-muted);
  border: 1px solid var(--border);
}

.player-model-box .field-label {
  font-size: 12px;
}

.player-action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

@media (max-width: 420px) {
  .player-action-grid {
    grid-template-columns: 1fr;
  }
}

.player-action-btn {
  min-height: 2.35rem;
  font-size: 13px;
  font-weight: 500;
}

.player-action-grid .btn {
  width: 100%;
  justify-content: center;
  text-align: center;
}

.player-punish-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
}

.player-punish-grid form {
  margin: 0;
}

.player-punish-grid .player-action-btn {
  width: 100%;
}

@media (max-width: 520px) {
  .player-punish-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* 玩家详情：队列操作弹窗（给予物品 / 货币 / 载具等）视口居中
   不用 inset:0 + margin:auto：部分浏览器下与原生 <dialog> 盒模型组合会把弹窗挤到视口底部；用 50% + translate 最稳 */
dialog.player-admin-modal {
  border: none;
  padding: 0;
  width: min(100vw - 2rem, 26rem);
  max-width: calc(100vw - 2rem);
  max-height: min(90vh, 28rem);
  overflow: auto;
  box-sizing: border-box;
  position: fixed;
  left: 50%;
  top: 50%;
  right: auto;
  bottom: auto;
  margin: 0;
  transform: translate(-50%, -50%);
}

dialog.player-admin-modal[open] {
  display: block;
}

dialog.player-admin-modal::backdrop {
  background: rgba(15, 23, 42, 0.45);
}

dialog.player-admin-modal .player-admin-modal-inner {
  padding: 1rem 1.15rem;
}

/* 车辆管理 · 重置入库：列表弹窗视口居中（与 player-admin-modal 一致，且不用 .card 避免 margin 把弹窗挤到底部） */
/* inset + margin:auto：避免在含 transform 的祖先内 left/top 50% 先出现在右下角再跳变 */
dialog.veh-dialog {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow:
    0 25px 50px -12px rgba(15, 23, 42, 0.18),
    0 0 0 1px rgba(15, 23, 42, 0.04);
  padding: 0;
  position: fixed;
  inset: 0;
  width: min(100vw - 2rem, 44rem);
  max-width: calc(100vw - 2rem);
  max-height: min(90vh, 36rem);
  height: max-content;
  overflow: hidden;
  box-sizing: border-box;
  margin: auto;
  transform: none;
}

dialog.veh-dialog[open] {
  display: block;
}

dialog.veh-dialog::backdrop {
  background: rgba(15, 23, 42, 0.45);
}

/* 车辆储物弹窗 v2（页签 + 汇总条 + 列表卡片） */
#veh-stash-dialog.veh-stash-dlg .veh-stash-dlg-top {
  padding: 1rem 1.15rem 0.85rem;
  background: linear-gradient(180deg, #fff 0%, #fafbff 100%);
  border-bottom: 1px solid var(--border);
}

#veh-stash-dialog.veh-stash-dlg .veh-stash-dlg-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0;
}

#veh-stash-dialog.veh-stash-dlg .veh-dlg-brand {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  min-width: 0;
  flex: 1;
}

#veh-stash-dialog.veh-stash-dlg .veh-stash-dlg-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(145deg, #a69bf5 0%, #7968e8 48%, #6b5ad6 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 6px 18px rgba(107, 90, 214, 0.32);
}

#veh-stash-dialog.veh-stash-dlg .veh-stash-dlg-icon svg {
  display: block;
}

#veh-stash-dialog.veh-stash-dlg .veh-dlg-h-title {
  margin: 0;
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.25;
}

#veh-stash-dialog.veh-stash-dlg .veh-stash-dlg-plate {
  margin: 0.28rem 0 0;
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 500;
  letter-spacing: 0.06em;
}

#veh-stash-dialog.veh-stash-dlg .veh-dlg-close {
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--t-fast) var(--ease-soft), color var(--t-fast) var(--ease-soft);
}

#veh-stash-dialog.veh-stash-dlg .veh-dlg-close:hover {
  background: var(--surface-muted);
  color: var(--text);
}

#veh-stash-dialog.veh-stash-dlg .veh-stash-dlg-body {
  padding: 0.85rem 1.1rem 1.1rem;
  background: #f4f5fb;
}

.veh-stash-v2 {
  --veh-stash-p: #8b7af0;
  --veh-stash-p2: #6d5ad6;
  --veh-stash-soft: #eef0ff;
  --veh-stash-soft2: #e8e5ff;
}

.veh-stash-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.veh-stash-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.55rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  transition:
    background var(--t-fast) var(--ease-soft),
    border-color var(--t-fast) var(--ease-soft),
    box-shadow var(--t-fast) var(--ease-soft);
}

.veh-stash-tab:hover {
  border-color: #d4cef9;
  background: #faf9ff;
}

.veh-stash-tab.is-active {
  background: linear-gradient(180deg, #f5f3ff 0%, var(--veh-stash-soft) 100%);
  border-color: #cfc4f5;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset;
}

.veh-stash-tab-ic {
  display: flex;
  color: var(--veh-stash-p2);
  opacity: 0.9;
}

.veh-stash-tab.is-active .veh-stash-tab-ic {
  color: var(--veh-stash-p);
}

.veh-stash-tab-lbl {
  flex: 0 1 auto;
}

.veh-stash-tab-badge {
  min-width: 1.35rem;
  height: 1.35rem;
  padding: 0 0.28rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.35rem;
  text-align: center;
  color: #fff;
}

.veh-stash-tab-badge--trunk {
  background: linear-gradient(180deg, #60a5fa 0%, #3b82f6 100%);
}

.veh-stash-tab-badge--glove {
  background: linear-gradient(180deg, #f87171 0%, #ef4444 100%);
}

.veh-stash-panels {
  position: relative;
}

.veh-stash-panel {
  display: none;
}

.veh-stash-panel.is-active {
  display: block;
}

.veh-stash-summary {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.75rem;
  margin-bottom: 0.65rem;
  border-radius: 10px;
  font-size: 0.84rem;
  font-weight: 600;
  color: #4338a6;
  background: linear-gradient(90deg, var(--veh-stash-soft) 0%, #f5f3ff 100%);
  border: 1px solid #e0dcfa;
}

.veh-stash-summary-ic {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(145deg, #9d8ef5 0%, #7c6aed 100%);
  color: #fff;
  flex-shrink: 0;
}

.veh-stash-summary-ic svg {
  display: block;
  width: 16px;
  height: 16px;
}

.veh-stash-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.veh-stash-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}

.veh-stash-item-ic {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(145deg, #a69bf5 0%, #7968e8 52%, #6b5ad6 100%);
  box-shadow: 0 4px 12px rgba(107, 90, 214, 0.25);
}

.veh-stash-item-ic svg {
  display: block;
  opacity: 0.95;
}

.veh-stash-item-txt {
  flex: 1;
  min-width: 0;
}

.veh-stash-item-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.25;
}

.veh-stash-item-code {
  margin-top: 0.15rem;
  font-size: 0.78rem;
  color: var(--muted);
}

.veh-stash-item-qty {
  flex-shrink: 0;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #5b4aca;
  background: var(--veh-stash-soft);
  border: 1px solid #ddd6fe;
}

.veh-stash-empty-v2 {
  margin: 0;
  padding: 1.5rem 0.75rem;
  text-align: center;
  font-size: 0.88rem;
  color: var(--muted);
  border: 1px dashed var(--border);
  border-radius: 12px;
  background: var(--surface);
}

.player-action-form--inline {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.5rem;
}

.player-action-form--inline .player-action-btn {
  width: auto;
  flex-shrink: 0;
}

.player-roadmap.card {
  padding: 0;
}

.player-roadmap {
  overflow: hidden;
}

.player-roadmap > summary {
  list-style: none;
}

.player-roadmap-summary {
  cursor: pointer;
  padding: 0.85rem 1.1rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  background: var(--surface-muted);
  border-bottom: 1px solid transparent;
  transition: background var(--t-fast) var(--ease-soft);
}

.player-roadmap-summary::-webkit-details-marker {
  display: none;
}

.player-roadmap-summary::after {
  content: "▸";
  float: right;
  font-size: 0.75rem;
  color: var(--muted);
  transition: transform var(--t-fast) var(--ease-soft);
}

.player-roadmap[open] .player-roadmap-summary::after {
  transform: rotate(90deg);
}

.player-roadmap[open] .player-roadmap-summary {
  border-bottom-color: var(--border);
}

.player-roadmap-summary:hover {
  background: #f4f4f5;
}

.player-roadmap-body {
  padding: 0.85rem 1.1rem 1rem;
  font-size: 13px;
  line-height: 1.55;
  color: var(--muted);
}

.player-roadmap-body p {
  margin: 0 0 0.55rem;
}

.player-roadmap-body p:last-child {
  margin-bottom: 0;
}

.player-roadmap-body strong {
  color: var(--text);
  font-weight: 600;
}

/* 作弊检测强提醒（网页后台顶栏） */
.ac-alert-strip {
  margin: 0 0 1rem;
  border-radius: var(--radius);
  border: 2px solid #dc2626;
  background: linear-gradient(90deg, rgba(220, 38, 38, 0.14), rgba(220, 38, 38, 0.06));
  box-shadow: 0 0 0 1px rgba(220, 38, 38, 0.2), 0 8px 24px rgba(220, 38, 38, 0.12);
  animation: ac-alert-pulse-border 1.6s ease-in-out infinite;
}

.ac-alert-strip-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  padding: 0.85rem 1rem;
}

.ac-alert-strip-pulse {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #dc2626;
  flex-shrink: 0;
  animation: ac-alert-pulse-dot 1.2s ease-in-out infinite;
}

.ac-alert-strip-text {
  flex: 1 1 12rem;
  min-width: 0;
}

.ac-alert-strip-title {
  display: block;
  font-size: 0.95rem;
  color: #b91c1c;
  margin-bottom: 0.15rem;
}

.ac-alert-strip-msg {
  font-size: 0.85rem;
  color: var(--text);
}

.ac-alert-strip-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

@keyframes ac-alert-pulse-border {
  0%,
  100% {
    border-color: #dc2626;
  }
  50% {
    border-color: #f87171;
  }
}

@keyframes ac-alert-pulse-dot {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.45;
    transform: scale(0.85);
  }
}
