:root {
  --brand: #0052d9;
  --brand-dark: #003cab;
  --bg: #f2f5fa;
  --panel: #ffffff;
  --text: #0f172a;
  --text-2: #475467;
  --text-3: #98a2b3;
  --line: #e6ebf3;
  --danger: #d92d20;
  --success: #067647;
  --radius: 14px;
  --shadow: 0 12px 32px rgba(16, 42, 96, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-size: 14px;
  line-height: 1.5;
}

.hidden {
  display: none !important;
}

/* -------------------- 登录 -------------------- */

.login {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px 24px 56px;
  background: radial-gradient(circle at 20% 20%, #1c3f9e 0%, #061b46 55%, #030d24 100%);
}

.login__card {
  width: 100%;
  max-width: 420px;
  padding: 36px;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.28);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand__mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #17339a, #4b8bff);
  color: #fff;
  font-size: 20px;
  font-weight: 700;
}

.brand__mark--sm {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  font-size: 16px;
}

.brand__name {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 1px;
}

.brand__sub {
  color: var(--text-3);
  font-size: 12px;
}

.login__title {
  margin: 28px 0 6px;
  font-size: 22px;
}

.login__desc {
  margin: 0 0 24px;
  color: var(--text-2);
  font-size: 13px;
}

.login__form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.login__error {
  min-height: 18px;
  margin: 0;
  color: var(--danger);
  font-size: 12px;
}

.login__tip {
  margin: 20px 0 0;
  color: var(--text-3);
  font-size: 12px;
  text-align: center;
}

/* -------------------- 通用控件 -------------------- */

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field__label {
  color: var(--text-2);
  font-size: 12px;
  font-weight: 600;
}

.input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfcfe;
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  line-height: 1.6;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(0, 82, 217, 0.12);
  background: #fff;
}

textarea.input {
  resize: vertical;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: #eef2f8;
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s ease, background 0.15s ease;
}

.btn:hover {
  opacity: 0.88;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn--primary {
  background: var(--brand);
  color: #fff;
}

.btn--primary:hover {
  background: var(--brand-dark);
}

.btn--ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--text-2);
}

.btn--sm {
  padding: 7px 12px;
  font-size: 12px;
}

.btn--block {
  width: 100%;
  padding: 12px;
}

.btn--danger {
  background: #fef3f2;
  color: var(--danger);
  border-color: #fecdca;
}

/* -------------------- 布局 -------------------- */

.admin {
  min-height: 100vh;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  padding: 0 24px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
}

.topbar__brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar__user {
  display: flex;
  align-items: center;
  gap: 12px;
}

.chip-user {
  padding: 6px 12px;
  border-radius: 999px;
  background: #eef4ff;
  color: var(--brand);
  font-size: 12px;
  font-weight: 600;
}

.layout {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  max-width: 1240px;
  margin: 0 auto;
  padding: 20px 24px 64px;
}

.sidebar {
  position: sticky;
  top: 84px;
  flex: 0 0 280px;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.sidebar__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 18px 14px;
  border-bottom: 1px solid var(--line);
}

.sidebar__title {
  font-size: 15px;
  font-weight: 700;
}

.sidebar__hint {
  margin-top: 2px;
  color: var(--text-3);
  font-size: 11px;
}

.group-list {
  max-height: calc(100vh - 240px);
  margin: 0;
  padding: 8px;
  overflow-y: auto;
  list-style: none;
}

.group-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.group-item:hover {
  background: #f5f8ff;
}

.group-item.active {
  background: #e8f0ff;
}

.group-item__toggle {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
  color: var(--text-2);
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.group-item__toggle.is-empty {
  border-color: transparent;
  background: transparent;
  color: var(--text-3);
  cursor: default;
}

.group-item__toggle.open {
  border-color: #bcd2ff;
  color: var(--brand);
}

.group-item__main {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.group-item__tail {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 6px;
}

.group-item__add {
  width: 22px;
  height: 22px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--text-2);
  font-family: inherit;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
}

.group-item__add:hover {
  border-color: #bcd2ff;
  background: #f2f7ff;
  color: var(--brand);
}

.group-item__name {
  overflow: hidden;
  font-size: 13px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.group-item__meta {
  color: var(--text-3);
  font-size: 11px;
}

.dot {
  width: 8px;
  height: 8px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #d0d5dd;
}

.dot.on {
  background: #12b76a;
}

.group-item__count {
  flex-shrink: 0;
  padding: 2px 8px;
  border-radius: 999px;
  background: #f2f4f7;
  color: var(--text-2);
  font-size: 11px;
}

.sidebar__foot {
  padding: 12px 18px;
  border-top: 1px solid var(--line);
  color: var(--text-3);
  font-size: 12px;
}

.main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.panel {
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.panel__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
}

.panel__title {
  margin: 0;
  font-size: 17px;
}

.panel__desc {
  margin: 4px 0 0;
  color: var(--text-3);
  font-size: 12px;
}

.panel__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.panel__body {
  padding: 20px 22px;
}

.group-form {
  display: grid;
  grid-template-columns: 1.2fr 1.8fr 0.8fr 0.8fr auto;
  gap: 14px;
  align-items: end;
}

.group-form__actions {
  display: flex;
  gap: 8px;
}

.switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-2);
  font-size: 12px;
  cursor: pointer;
  user-select: none;
}

.switch input {
  display: none;
}

.switch__track {
  position: relative;
  width: 36px;
  height: 20px;
  border-radius: 999px;
  background: #d0d5dd;
  transition: background 0.2s ease;
}

.switch__track::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s ease;
}

.switch input:checked + .switch__track {
  background: var(--brand);
}

.switch input:checked + .switch__track::after {
  transform: translateX(16px);
}

.option {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfcfe;
}

.option + .option {
  margin-top: 12px;
}

.option.is-disabled {
  opacity: 0.62;
}

.option__head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.option__label {
  flex: 0 0 180px;
}

.option__order {
  flex: 0 0 84px;
}

.option__spacer {
  flex: 1;
}

.option__prompt {
  margin-top: 10px;
  min-height: 60px;
}

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 80px 24px;
  border-radius: var(--radius);
  background: #fff;
  color: var(--text-3);
  box-shadow: var(--shadow);
}

.empty__title {
  color: var(--text);
  font-size: 16px;
  font-weight: 700;
}

/* -------------------- 弹窗与提示 -------------------- */

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal__mask {
  position: absolute;
  inset: 0;
  background: rgba(8, 16, 32, 0.52);
}

.modal__panel {
  position: relative;
  width: 100%;
  max-width: 640px;
  max-height: 88vh;
  padding: 24px;
  overflow-y: auto;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.24);
}

.modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.modal__head h2 {
  margin: 0;
  font-size: 18px;
}

.modal__head p {
  margin: 4px 0 0;
  color: var(--text-3);
  font-size: 12px;
}

.modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

.import-input {
  min-height: 220px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
}

.import-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 14px;
}

.radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  color: var(--text-2);
  font-size: 12px;
}

.radio-group label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.form-error {
  min-height: 18px;
  margin: 10px 0 0;
  color: var(--danger);
  font-size: 12px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 40px;
  z-index: 80;
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  color: #fff;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.toast.error {
  background: rgba(217, 45, 32, 0.94);
}

/* -------------------- 顶部模块导航 -------------------- */

.topnav {
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: #f2f5fa;
}

.topnav__item {
  padding: 7px 16px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text-2);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.topnav__item:hover {
  color: var(--brand);
}

.topnav__item.active {
  background: #fff;
  color: var(--brand);
  box-shadow: 0 2px 8px rgba(16, 42, 96, 0.12);
}

.layout--single {
  display: block;
  max-width: 1240px;
}

/* -------------------- 分类树 -------------------- */

.category-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 1fr);
  gap: 22px;
}

.category-tree {
  min-height: 260px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfcfe;
}

.cat-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.cat-row:hover {
  background: #f2f7ff;
}

.cat-row.active {
  background: #e8f0ff;
}

.cat-toggle {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--text-2);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.cat-toggle.is-empty {
  border-color: transparent;
  background: transparent;
  cursor: default;
}

.cat-toggle.open {
  border-color: #bcd2ff;
  color: var(--brand);
}

.cat-row__main {
  display: flex;
  flex: 1;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}

.cat-row__name {
  overflow: hidden;
  font-size: 13px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cat-row__meta {
  color: var(--text-3);
  font-size: 11px;
}

.cat-row__actions {
  display: flex;
  gap: 6px;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.cat-row:hover .cat-row__actions,
.cat-row.active .cat-row__actions {
  opacity: 1;
}

.category-editor {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfcfe;
  align-self: start;
}

.panel__title--sm {
  margin-bottom: 14px;
  font-size: 15px;
}

.category-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-items: center;
}

.switch--field {
  align-self: end;
  padding-bottom: 9px;
}

.form-hint {
  margin: 0;
  color: var(--text-3);
  font-size: 11px;
  word-break: break-all;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* -------------------- 社区管理 -------------------- */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.stat-grid--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stat {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(180deg, #fbfcfe, #f5f8ff);
}

.stat__value {
  color: var(--brand);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
}

.stat__value--danger {
  color: var(--danger);
}

.stat__label {
  margin-top: 2px;
  color: var(--text-3);
  font-size: 12px;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 16px;
}

.input--sm {
  width: auto;
  min-width: 140px;
  padding: 8px 10px;
  font-size: 12px;
}

.toolbar .input--sm:last-of-type {
  flex: 1;
  min-width: 180px;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.table th {
  padding: 10px 12px;
  background: #f7f9fd;
  color: var(--text-2);
  font-weight: 600;
  text-align: left;
  white-space: nowrap;
}

.table td {
  padding: 10px 12px;
  border-top: 1px solid var(--line);
  vertical-align: middle;
}

.table tbody tr:hover {
  background: #fbfdff;
}

.table .empty {
  padding: 40px 12px;
  background: transparent;
  box-shadow: none;
}

.thumb {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: #eef2f8;
  object-fit: cover;
}

.thumb--lg {
  width: 72px;
  height: 72px;
}

.cell-title {
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
}

.cell-sub {
  margin-top: 2px;
  color: var(--text-2);
  font-size: 11px;
}

.cell-sub--faint {
  color: var(--text-3);
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.badge {
  display: inline-flex;
  align-items: center;
  margin-top: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.badge--pending {
  background: #fff6e6;
  color: #b54708;
}

.badge--published {
  background: #ecfdf3;
  color: var(--success);
}

.badge--offline {
  background: #f2f4f7;
  color: var(--text-2);
}

.badge--rejected {
  background: #fef3f2;
  color: var(--danger);
}

.badge--violation {
  background: #fef3f2;
  color: var(--danger);
}

.badge--resolved {
  background: #ecfdf3;
  color: var(--success);
}

.badge--on {
  background: #ecfdf3;
  color: #027a48;
}

.badge--off {
  background: #f2f4f7;
  color: #667085;
}

.badge--log {
  background: #eef4ff;
  color: var(--brand);
}

.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  color: var(--text-3);
  font-size: 12px;
}

.pager__actions {
  display: flex;
  gap: 8px;
}

.report-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.report {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfcfe;
}

.report__main {
  flex: 1;
  min-width: 0;
}

.report__head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.report__reason {
  margin-top: 4px;
  color: var(--text);
  font-size: 12px;
}

.report__actions {
  display: flex;
  flex-shrink: 0;
  gap: 8px;
}

.modal__panel--sm {
  max-width: 460px;
}

.form-modal__body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

@media (max-width: 900px) {
  .topbar {
    flex-wrap: wrap;
    height: auto;
    padding: 12px 16px;
    gap: 10px;
  }

  .topnav {
    order: 3;
    width: 100%;
    overflow-x: auto;
  }

  .topnav__item {
    flex-shrink: 0;
  }

  .category-layout {
    grid-template-columns: 1fr;
  }

  .stat-grid,
  .stat-grid--3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cat-row__actions {
    opacity: 1;
  }
}


@media (max-width: 900px) {
  .layout {
    flex-direction: column;
    padding: 14px;
  }

  .sidebar {
    position: static;
    width: 100%;
    flex: none;
  }

  .group-list {
    display: flex;
    gap: 8px;
    max-height: none;
    overflow-x: auto;
    overflow-y: hidden;
  }

  .group-item {
    flex-shrink: 0;
  }

  .sidebar__foot {
    display: none;
  }

  .group-form {
    grid-template-columns: 1fr 1fr;
  }

  .group-form__actions {
    grid-column: 1 / -1;
  }

  .option__head {
    flex-wrap: wrap;
  }

  .option__label {
    flex: 1 1 140px;
  }

  .option__spacer {
    display: none;
  }

  .panel__head {
    flex-direction: column;
  }

  .panel__actions {
    justify-content: flex-start;
  }
}

@media (max-width: 520px) {
  .topbar {
    padding: 0 14px;
  }

  .topbar__user .btn {
    padding: 8px 10px;
  }

  .login__card {
    padding: 26px 22px;
  }

  .group-form {
    grid-template-columns: 1fr;
  }

  .option__order {
    flex: 1 1 70px;
  }
}

/* -------------------- 领域包制作工具 -------------------- */

.modal__panel--lg {
  max-width: 1180px;
}

.pack-builder {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 20px;
  min-height: 520px;
}

.pack-builder__left {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  overflow-y: auto;
  max-height: 560px;
  background: var(--bg);
}

.pack-builder__right {
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
  max-height: 620px;
  padding-right: 4px;
}

.pack-builder__meta {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  background: var(--panel);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pack-builder__options-head {
  font-size: 13px;
  color: var(--text-2);
}

.pack-builder__options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pack-builder__option-group {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  background: var(--panel);
}

.pack-builder__option-group h4 {
  margin: 0 0 8px;
  font-size: 14px;
  color: var(--text);
}

.pack-builder__option-group .options {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 6px 14px;
}

.pack-builder__option-group label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-2);
  cursor: pointer;
}

.pack-builder__summary {
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--bg);
  color: var(--text-2);
  font-size: 13px;
  border: 1px dashed var(--line);
}

.pack-builder__summary.ok {
  background: #ecfdf3;
  border-color: #b4e1c7;
  color: var(--success);
}

/* -------------------- 领域包列表 -------------------- */

.packs-summary {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.packs-summary__item {
  background: var(--panel);
  border-radius: 10px;
  padding: 14px 16px;
  border: 1px solid var(--line);
}

.packs-summary__num {
  font-size: 22px;
  font-weight: 600;
  color: var(--brand);
}

.packs-summary__label {
  font-size: 12px;
  color: var(--text-3);
  margin-top: 4px;
}

.packs-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--panel);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
}

.packs-table th,
.packs-table td {
  padding: 12px 14px;
  text-align: left;
  font-size: 13px;
  border-bottom: 1px solid var(--line);
}

.packs-table th {
  background: var(--bg);
  color: var(--text-2);
  font-weight: 500;
}

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

.packs-table td.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.packs-filter {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.packs-filter input,
.packs-filter select {
  min-width: 160px;
}

.chip {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 12px;
  line-height: 18px;
  background: var(--bg);
  color: var(--text-2);
}

.chip.status--published { background: #ecfdf3; color: var(--success); }
.chip.status--draft     { background: #fff7e6; color: #b54708; }
.chip.status--offline   { background: #f3f4f6; color: var(--text-3); }


/* ==================== 交互优化：通用组件 ==================== */

/* 顶栏分组导航 */
.topnav__group {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 6px;
}

.topnav__group + .topnav__group {
  border-left: 1px solid rgba(255, 255, 255, 0.16);
  margin-left: 6px;
  padding-left: 12px;
}

.topnav__label {
  margin-right: 4px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 11px;
  letter-spacing: 0.08em;
}

/* 通用文本与小按钮 */
.muted { color: var(--text-3); font-size: 12px; }
.dot-sep { color: var(--line); padding: 0 2px; }
.link-btn {
  padding: 0;
  border: 0;
  background: none;
  color: var(--brand);
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
}
.link-btn:hover { text-decoration: underline; }
.link-btn--danger { color: var(--danger); }
.link-btn.is-off { color: var(--text-3); }
.req { color: var(--danger); }
.form-hint { margin: 6px 0 0; color: var(--text-3); font-size: 12px; }
.btn--danger-ghost { color: var(--danger); }
.btn--text-danger { color: var(--danger); }

/* 搜索框 */
.search-input { position: relative; display: flex; align-items: center; }
.search-input .input--search {
  width: 100%;
  padding-right: 30px;
  background: #f7f9fc;
}
.search-input__clear {
  position: absolute;
  right: 6px;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #e6ebf3;
  color: var(--text-2);
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
}
.search-input--sm .input--search { padding: 7px 30px 7px 10px; font-size: 12px; }

/* 标签筛选 chips */
.chip-filter { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-filter__item {
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--text-2);
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.chip-filter__item:hover { border-color: #bcd2ff; color: var(--brand); }
.chip-filter__item.active {
  border-color: var(--brand);
  background: #eef4ff;
  color: var(--brand);
  font-weight: 600;
}

/* 复选框 */
.checkbox {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}
.checkbox input { position: absolute; opacity: 0; width: 0; height: 0; }
.checkbox__box {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  border: 1px solid #c9d3e3;
  border-radius: 4px;
  background: #fff;
  transition: all 0.15s ease;
}
.checkbox input:checked + .checkbox__box {
  border-color: var(--brand);
  background: var(--brand);
}
.checkbox input:checked + .checkbox__box::after {
  content: '';
  display: block;
  width: 4px;
  height: 8px;
  margin: 1px 0 0 5px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.checkbox input:indeterminate + .checkbox__box {
  border-color: var(--brand);
  background: var(--brand);
}
.checkbox input:indeterminate + .checkbox__box::after {
  content: '';
  display: block;
  width: 8px;
  height: 2px;
  margin: 6px 0 0 3px;
  background: #fff;
}
.checkbox--inline .checkbox__text { font-size: 12px; color: var(--text-2); }

/* 标签 */
.tag {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 6px;
  font-size: 11px;
  line-height: 16px;
  white-space: nowrap;
}
.tag--primary { background: #eef4ff; color: var(--brand); }
.tag--adv { background: #f4ecff; color: #6941c6; }
.tag--muted { background: #f3f4f6; color: var(--text-3); }
.pill {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  background: #f2f5fa;
  color: var(--text-2);
  font-size: 12px;
}
.pill--more { background: #eef4ff; color: var(--brand); }

/* Tooltip */
.tip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  margin-left: 4px;
  padding: 0;
  border: 1px solid #c9d3e3;
  border-radius: 50%;
  background: #fff;
  color: var(--text-3);
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  cursor: help;
  position: relative;
}
.tip:hover { border-color: var(--brand); color: var(--brand); }
.tip::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  z-index: 60;
  width: max-content;
  max-width: 260px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #0f172a;
  color: #fff;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.5;
  white-space: normal;
  text-align: left;
  transform: translateX(-50%) translateY(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.tip:hover::after { opacity: 1; transform: translateX(-50%) translateY(0); }

/* 输入错误 */
.input.is-invalid,
.is-invalid.input {
  border-color: var(--danger);
  background: #fff5f4;
}

/* 侧边栏结构（两级：标题行 + 工具区） */
.sidebar .sidebar__head { display: block; }
.sidebar__title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.sidebar__tools {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}
.sidebar__expand { display: flex; align-items: center; gap: 4px; }
.sidebar__foot {
  padding: 10px 18px;
  border-top: 1px solid var(--line);
  color: var(--text-3);
  font-size: 11px;
}
.sidebar .group-list { max-height: calc(100vh - 360px); }
.sidebar .group-item { padding: 8px 10px; }
.group-item__text { min-width: 0; flex: 1; }
.group-item__name { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.group-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 28px 12px;
  color: var(--text-3);
  font-size: 12px;
}

/* 页面头 */
.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.page-head__title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  font-weight: 700;
}
.page-head__desc { margin-top: 4px; color: var(--text-2); font-size: 12px; }
.page-head__actions { display: flex; flex-shrink: 0; gap: 8px; flex-wrap: wrap; }

/* 统计卡片 */
.stat-grid { display: grid; gap: 12px; margin-bottom: 16px; }
.stat-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stat {
  padding: 14px 16px;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}
.stat__value { font-size: 22px; font-weight: 700; line-height: 1.2; }
.stat__value--success { color: var(--success); }
.stat__value--warning { color: #b54708; }
.stat__value--muted { color: var(--text-3); }
.stat__label { margin-top: 2px; color: var(--text-3); font-size: 12px; }

/* 可折叠面板 */
.panel--collapsible .panel__toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 14px 18px;
  border: 0;
  background: none;
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}
.panel--collapsible.is-collapsed .panel__toggle { border-radius: var(--radius); }
.panel__toggle-hint { color: var(--text-3); font-size: 12px; font-weight: 400; }
.panel__toggle-chev {
  width: 0;
  height: 0;
  border-left: 5px solid var(--text-3);
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  transition: transform 0.15s ease;
}
.panel__toggle-chev.open { transform: rotate(90deg); }

/* 列表工具条 + 批量操作条 */
.panel__head--stack { flex-direction: column; align-items: stretch; gap: 10px; }
.list-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.list-toolbar .search-input { flex: 0 0 220px; }
.list-toolbar__count { font-size: 12px; }
.bulkbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid #bcd2ff;
  border-radius: 10px;
  background: #f5f8ff;
  flex-wrap: wrap;
}
.bulkbar__count { color: var(--text-2); font-size: 12px; }
.bulkbar__count b { color: var(--brand); font-size: 14px; }

/* 提示词列表补充 */
.option.is-selected { border-color: #bcd2ff; background: #f7faff; }
.option__new-badge {
  padding: 1px 8px;
  border-radius: 6px;
  background: #eef4ff;
  color: var(--brand);
  font-size: 11px;
}
.option__hint { margin-top: 6px; color: var(--text-3); font-size: 11px; }
.option__error {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  padding: 6px 10px;
  border-radius: 8px;
  background: #fff5f4;
  color: var(--danger);
  font-size: 12px;
}
.option--new { border-style: dashed; background: #fbfcff; }

/* 空状态补充 */
.empty--sm { padding: 28px 16px; background: transparent; box-shadow: none; }
.empty__desc { color: var(--text-3); font-size: 12px; text-align: center; }
.empty__action { display: flex; gap: 8px; }

/* 表格补充 */
.cell-check { width: 42px; }
.cell-title { font-weight: 500; }
.cell-sub { color: var(--text-3); font-size: 12px; }
tr.is-selected td { background: #f7faff; }
.table-wrap { overflow-x: auto; }

/* 分页 */
.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px;
  border-top: 1px solid var(--line);
}

/* 弹窗尺寸 */
.modal__panel--xl { max-width: 1080px; width: 100%; }
.modal__actions--split { justify-content: space-between; align-items: center; }

/* 导入弹窗 */
.import-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 16px; }
.import-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}
.import-toolbar__actions { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.import-input { width: 100%; min-height: 220px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.import-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.import-preview { color: var(--brand); font-size: 12px; font-weight: 600; }
.import-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.import-table {
  max-height: 240px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfcfe;
}
.import-row {
  display: grid;
  grid-template-columns: 28px 92px 110px 1fr;
  gap: 8px;
  align-items: center;
  padding: 6px 10px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}
.import-row:last-child { border-bottom: 0; }
.import-row__idx { color: var(--text-3); }
.import-row__tag { color: var(--brand); }
.import-row__label { font-weight: 600; }
.import-row__prompt { overflow: hidden; color: var(--text-3); text-overflow: ellipsis; white-space: nowrap; }
.import-more { padding: 8px 10px; color: var(--text-3); font-size: 11px; }
.import-issues {
  margin-top: 8px;
  padding: 10px;
  border: 1px solid #f5d0c9;
  border-radius: 10px;
  background: #fff8f7;
}
.import-issues__head { color: var(--danger); font-size: 12px; font-weight: 600; margin-bottom: 6px; }
.import-issue {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 4px 0;
  font-size: 12px;
}
.import-issue__line { color: var(--danger); font-weight: 600; }
.import-issue__raw {
  max-width: 100%;
  overflow: hidden;
  padding: 1px 6px;
  border-radius: 4px;
  background: #fff;
  color: var(--text-2);
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 向导 */
.wizard-steps {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
}
.wizard-step {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--text-3);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.wizard-step__no {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #eef2f8;
  color: var(--text-3);
  font-size: 12px;
  font-weight: 700;
}
.wizard-step.active { border-color: var(--brand); background: #f5f8ff; color: var(--brand); font-weight: 600; }
.wizard-step.active .wizard-step__no { background: var(--brand); color: #fff; }
.wizard-step.done { border-color: #bcd2ff; color: var(--brand); }
.wizard-step.done .wizard-step__no { background: #eef4ff; color: var(--brand); }
.wizard-body { min-height: 0; padding-right: 4px; overflow: visible; }
.wizard-pane { height: 100%; }
.wizard-progress { color: var(--text-3); font-size: 12px; }
.wizard-actions { display: flex; gap: 8px; }

/* 步骤 1：提示词选择 */
.pack-pick { display: grid; grid-template-columns: 320px 1fr; gap: 16px; min-height: 400px; }
.pack-prompt-editor { display: grid; grid-template-columns: 280px 1fr; gap: 16px; min-height: 460px; }
.pack-prompt-sidebar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  max-height: 520px;
}
.pack-prompt-sidebar__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pack-prompt-sidebar .group-list { flex: 1 1 auto; overflow-y: auto; margin: 0; padding: 0; }
.pack-prompt-sidebar .group-item { padding: 8px 10px; }
.pack-prompt-sidebar .group-item__text { min-width: 0; flex: 1; }
.pack-prompt-sidebar .group-item__name { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pack-prompt-sidebar .group-item__name > span[data-pb-rename-group] { cursor: text; }
.pack-prompt-sidebar .group-item__tail { gap: 4px; }
.pack-prompt-sidebar .group-item__add[disabled] { opacity: 0.4; cursor: not-allowed; }
.pack-prompt-sidebar .group-item.is-dragging { opacity: 0.45; }
.pack-prompt-sidebar .group-item.drag-over-before { box-shadow: inset 0 2px 0 var(--brand); }
.pack-prompt-sidebar .group-item.drag-over-after { box-shadow: inset 0 -2px 0 var(--brand); }
.pack-prompt-sidebar .group-item.drag-over-inside { background: #e8f0ff; outline: 1px dashed #bcd2ff; }
.pb-group-move {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: var(--bg);
  font-size: 12px;
  flex-wrap: wrap;
}
.pb-group-move .input--sm { max-width: 220px; }

/* 作品管理：左侧分类树复用产品布局 */
.works-tree-panel .works-tree-list {
  max-height: calc(100vh - 300px);
  overflow-y: auto;
  padding: 8px;
}
.works-tree-list .cat-row { margin-bottom: 4px; }
.works-tree-list .cat-row__main { min-width: 0; }
.works-tree-list .cat-row__actions { gap: 4px; }
.works-tree-list .cat-row__actions .link-btn { white-space: nowrap; }

/* 定制产品：左侧分类树 + 右侧产品列表 */
.product-layout { display: flex; align-items: flex-start; gap: 16px; }
.product-tree-panel { flex: 0 0 280px; overflow: hidden; }
.product-content { flex: 1; min-width: 0; }
.product-tree-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 16px 16px 12px;
  border-bottom: 1px solid var(--line);
}
.product-tree-title { font-size: 15px; font-weight: 700; }
.product-tree-sub { margin-top: 3px; color: var(--text-3); font-size: 12px; }
.product-tree-list { max-height: calc(100vh - 300px); }
.product-tree-foot { padding: 10px 16px; border-top: 1px solid var(--line); color: var(--text-3); font-size: 12px; }
.product-tree-panel .group-item__text { min-width: 0; flex: 1; }
.product-tree-panel .group-item__name { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.product-tree-list .group-item.is-dragging { opacity: 0.45; }
.product-tree-list .group-item.drag-over-before { box-shadow: inset 0 2px 0 var(--brand); }
.product-tree-list .group-item.drag-over-after { box-shadow: inset 0 -2px 0 var(--brand); }
.product-tree-list .group-item.drag-over-inside { background: #e8f0ff; outline: 1px dashed #bcd2ff; }
@media (max-width: 1100px) {
  .product-layout { flex-direction: column; }
  .product-tree-panel { flex: 1 1 auto; width: 100%; }
  .product-tree-list { max-height: 320px; }
}
.pack-prompt-main {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  overflow-y: auto;
  max-height: 520px;
}
.pack-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.pack-section-head__title { font-size: 15px; font-weight: 600; color: var(--text); }
.pack-section-head__sub { font-size: 12px; margin-top: 4px; }
.pack-section-head__actions { display: flex; flex-wrap: wrap; gap: 4px; }
.pack-pick__left {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
}
.pack-pick__toolbar { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.pack-pick__toolbar .search-input { flex: 1 1 140px; }
.pack-pick__right {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  overflow-y: auto;
  max-height: 460px;
}
.pack-pick__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  font-weight: 600;
}
.pack-tree { max-height: 380px; overflow-y: auto; padding: 0; margin: 0; }
.pack-tree__node { list-style: none; }
.pack-tree__row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 8px;
  cursor: pointer;
}
.pack-tree__row:hover { background: #fff; }
.pack-tree__name { flex: 1; color: var(--text); font-size: 13px; }
.pack-tree__name.is-on { color: var(--brand); font-weight: 600; }
.pack-tree__count { color: var(--text-3); font-size: 11px; }
.pack-option {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 3px 6px 3px 0;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-size: 12px;
  cursor: pointer;
}
.pack-option:hover { border-color: #bcd2ff; }

/* 步骤 2：智能建议 */
.smart-tip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid #bcd2ff;
  border-radius: 10px;
  background: #f5f8ff;
  font-size: 12px;
  color: var(--text-2);
}
.smart-tip__actions { display: flex; gap: 10px; flex-wrap: wrap; }
.pack-builder__meta .form-row { display: flex; gap: 12px; }
.pack-builder__meta .form-row .field { flex: 1; }

/* 步骤 3：预览 */
.pack-preview { display: flex; flex-direction: column; gap: 14px; }
.pack-preview__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 16px;
  border-radius: var(--radius);
  background: linear-gradient(120deg, #f5f8ff, #eef4ff);
}
.pack-preview__title { font-size: 18px; font-weight: 700; }
.pack-preview__tags { display: flex; gap: 6px; flex-wrap: wrap; }
.pack-preview__stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.pack-preview__stats > div {
  display: flex;
  flex-direction: column;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}
.pack-preview__stats b { font-size: 18px; }
.pack-preview__stats span { color: var(--text-3); font-size: 11px; }
.pack-preview__hint {
  padding: 8px 12px;
  border-radius: 8px;
  background: #f7f9fc;
  color: var(--text-2);
  font-size: 12px;
}
.pack-preview__hint.ok { background: #ecfdf3; color: var(--success); }
.pack-preview__groups { display: flex; flex-direction: column; gap: 10px; }
.pack-preview__group { padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; }
.pack-preview__group-name { margin-bottom: 6px; font-size: 13px; font-weight: 600; }
.pack-preview__chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pack-preview__group-name .muted { font-weight: 400; }

/* 一键修正条 */
.fixbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding: 8px 12px;
  border: 1px solid #f5d0c9;
  border-radius: 10px;
  background: #fff8f7;
  font-size: 12px;
}
.fixbar__text { color: var(--danger); }

/* -------------------- 数据信息 -------------------- */

.stat-section-title {
  margin: 6px 0 12px;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
}

.stat__meta {
  margin-top: 6px;
  color: var(--text-3);
  font-size: 11px;
  line-height: 1.5;
}

.stat-filter {
  flex-wrap: wrap;
  align-items: flex-end;
}

.stat-filter__item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: var(--text-2);
  font-size: 12px;
}

.stat-filter__hint {
  margin-left: auto;
  color: var(--text-3);
  font-size: 12px;
}

.stat-chart-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.stat-chart {
  padding: 14px 16px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(180deg, #fbfcfe, #f5f8ff);
}

.stat-chart__head {
  margin-bottom: 10px;
  color: var(--text-2);
  font-size: 12px;
  font-weight: 600;
}

.stat-bars {
  display: flex;
  align-items: stretch;
  gap: 2px;
  height: 132px;
}

.stat-bars__col {
  display: flex;
  flex: 1;
  flex-direction: column;
  height: 100%;
  min-width: 0;
}

.stat-bars__track {
  display: flex;
  flex: 1;
  align-items: flex-end;
  min-height: 0;
}

.stat-bars__bar {
  width: 100%;
  border-radius: 3px 3px 0 0;
  transition: height 0.2s ease;
}

.stat-bars__label {
  height: 16px;
  color: var(--text-3);
  font-size: 10px;
  line-height: 16px;
  text-align: center;
}

@media (max-width: 1080px) {
  .stat-chart-grid { grid-template-columns: 1fr; }
  .stat-filter__hint { margin-left: 0; width: 100%; }
}

/* 响应式 */
@media (max-width: 1080px) {
  .import-grid, .pack-pick { grid-template-columns: 1fr; }
  .stat-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pack-preview__stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  /* 窄屏：顶栏与导航换行并允许横向滚动，避免整页横向溢出 */
  body { overflow-x: hidden; }
  .topbar { height: auto; flex-wrap: wrap; gap: 10px; padding: 10px 12px; }
  .topbar__user { margin-left: auto; }
  #topnav { width: 100%; overflow-x: auto; border-radius: 12px; }
  .topnav__group { flex-wrap: nowrap; white-space: nowrap; }
  .layout { flex-direction: column; padding: 12px 12px 56px; }
  .sidebar { position: static; width: 100%; flex: 1 1 auto; }
  .sidebar .group-list { max-height: 260px; }
  .page-head { flex-direction: column; }
  .main { padding: 0; }
  .panel__head, .panel__body { padding-left: 12px; padding-right: 12px; }
  .panel__title { font-size: 18px; }
}

/* -------------------- 备案信息页脚 -------------------- */

.site-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 32px;
  padding: 0 16px;
  background: rgba(255, 255, 255, 0.94);
  border-top: 1px solid var(--line);
  color: var(--text-3);
  font-size: 12px;
  line-height: 1;
  backdrop-filter: blur(6px);
}

.site-footer a {
  color: var(--text-3);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--brand);
  text-decoration: underline;
}

.site-footer__sep {
  color: var(--line);
}
