/* Secretariat people workspace: focused desktop layout with the existing mobile flow kept intact. */
.people-workspace {
  --people-surface: var(--workspace-surface, #fff);
  --people-surface-soft: var(--workspace-bg, #f5f6f3);
  --people-border: var(--workspace-line, #e4e5e1);
  --people-vermillion-soft: var(--workspace-accent-soft, #faedef);
  --people-org-rail-width: clamp(260px, 28vw, 300px);
  --people-search-max: 460px;
}

.people-workspace #workspaceMain {
  width: auto;
  padding-bottom: 112px;
}

@media (min-width: 1024px) {
  .people-workspace #workspaceMain {
    padding-bottom: 56px;
  }
}

.people-workspace .page-header {
  align-items: center;
  gap: 12px;
}

.people-workspace .page-title {
  min-width: 0;
}

.people-workspace .pending-btn,
.people-workspace .export-csv-btn {
  margin-left: 0;
}

.people-workspace .export-csv-btn {
  margin-left: auto;
}

.people-workspace .people-context-section {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
}

.people-workspace .people-context-section .semester-wrap {
  min-width: 0;
}

.people-workspace .people-context-section .health-grid {
  width: min(360px, 100%);
  margin: 0 0 0 auto;
}

.people-workspace .people-management-section {
  padding: 24px;
}

.people-workspace .section-header {
  align-items: flex-start;
}

.people-workspace .section-heading-copy {
  min-width: 0;
}

.people-workspace .section-description {
  margin-top: 5px;
  color: var(--ink-muted);
  font-size: 12px;
  line-height: 1.5;
}

.people-workspace .toolbar {
  margin: 18px 0 16px;
}

.people-workspace .people-results-toolbar {
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
}

.people-workspace .people-results-toolbar .search-field {
  flex: 0 1 var(--people-search-max);
  width: min(100%, var(--people-search-max));
  max-width: var(--people-search-max);
}

.people-workspace .people-results-toolbar #addPersonBtn {
  flex: 0 0 auto;
  margin-left: 0;
}

.people-workspace .search-field {
  display: flex;
  align-items: center;
  gap: var(--space-2, 8px);
  width: 100%;
  min-width: 0;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm, 8px);
  background: var(--bg-primary);
}

.people-workspace .search-field:focus-within {
  border-color: var(--workspace-accent, #b72d3b);
  box-shadow: 0 0 0 3px var(--people-vermillion-soft);
}

.people-workspace .search-field-label {
  flex: 0 0 auto;
  color: var(--vermillion);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.people-workspace .toolbar .search-input {
  min-width: 0;
  padding: 11px 0;
  border: 0;
  outline: 0;
  background: transparent;
}

.people-workspace .people-workspace-grid {
  display: grid;
  grid-template-columns: var(--people-org-rail-width) minmax(0, 1fr);
  align-items: start;
  gap: 18px;
}

.people-workspace .people-org-rail {
  min-width: 0;
  border: 1px solid var(--people-border);
  border-radius: var(--radius-lg, 16px);
  background: var(--people-surface);
  box-shadow: var(--shadow-sm, 0 2px 6px rgba(45, 45, 45, 0.04));
  overflow: hidden;
  position: sticky;
  top: 16px;
}

.people-workspace .people-org-rail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 15px 14px 12px;
  border-bottom: 1px solid var(--people-border);
  background: linear-gradient(180deg, var(--workspace-surface, #fff), var(--workspace-bg, #f5f6f3));
}

.people-workspace .people-org-rail-title {
  color: var(--ink-dark);
  font-size: 13px;
  font-weight: 700;
}

.people-workspace .people-org-rail-subtitle {
  margin-top: 3px;
  color: var(--ink-muted);
  font-size: 11px;
  line-height: 1.4;
}

.people-workspace .people-org-all {
  flex: 0 0 auto;
  padding: 5px 8px;
  border: 1px solid var(--people-border);
  border-radius: var(--radius-sm, 8px);
  background: var(--people-vermillion-soft);
  color: var(--vermillion);
  cursor: pointer;
  font: inherit;
  font-size: 11px;
}

.people-workspace .people-org-all:hover,
.people-workspace .people-org-all:focus-visible {
  border-color: var(--workspace-accent, #b72d3b);
  outline: 0;
}

.people-workspace .people-org-nav {
  max-height: min(62vh, 620px);
  padding: 8px 8px 10px;
  overflow-y: auto;
}

.people-workspace .people-org-nav-node {
  min-width: 0;
}

.people-workspace .people-org-nav-children {
  margin-left: 13px;
  border-left: 1px solid var(--people-border);
}

.people-workspace .people-org-nav-caret {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--ink-muted);
  cursor: pointer;
  flex: 0 0 18px;
  transition: transform 0.18s ease, color 0.15s, background 0.15s;
}

.people-workspace .people-org-nav-caret:hover {
  background: var(--color-surface-hover);
  color: var(--ink-dark);
}

.people-workspace .people-org-nav-caret svg {
  width: 11px;
  height: 11px;
  transition: transform 0.18s ease;
  transform: rotate(90deg);
}

.people-workspace .people-org-nav-caret.is-collapsed svg {
  transform: rotate(0deg);
}

.people-workspace .people-org-nav-caret-spacer {
  display: inline-block;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}

.people-workspace .org-node-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm, 0 2px 6px rgba(45, 45, 45, 0.04));
}

.people-workspace .org-node-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.people-workspace .org-node-card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 17px;
  font-weight: 700;
  color: var(--ink-dark);
}

.people-workspace .org-node-card-meta {
  margin-top: 4px;
  font-size: 12px;
  color: var(--ink-muted);
}

.people-workspace .org-node-card-tags {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.people-workspace .org-node-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.people-workspace .org-node-card-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-2, 8px);
  flex-wrap: wrap;
}

.people-workspace .person-card-info {
  flex: 1 1 auto;
  min-width: 0;
}

.people-workspace .person-card-path {
  min-width: 0;
  color: var(--ink-muted);
  font-size: 12px;
  line-height: 1.5;
}

.people-workspace .person-position-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.people-workspace .people-org-nav-item {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  min-width: 0;
  margin: 1px 0;
  padding: 8px 8px;
  border: 0;
  border-radius: var(--radius-sm, 8px);
  background: transparent;
  color: var(--ink-dark);
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.people-workspace .people-org-nav-item:hover,
.people-workspace .people-org-nav-item:focus-visible {
  background: var(--people-surface-soft);
  outline: 0;
}

.people-workspace .people-org-nav-item.is-selected {
  background: var(--people-vermillion-soft);
  color: var(--vermillion);
  font-weight: 700;
}

.people-workspace .people-org-nav-item.is-ancestor {
  color: var(--vermillion);
}

.people-workspace .people-org-nav-marker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 12px;
  color: var(--ink-muted);
}

.people-workspace .people-org-nav-marker svg {
  width: 14px;
  height: 14px;
}

.people-workspace .people-org-nav-item.is-selected .people-org-nav-marker {
  color: var(--vermillion);
}

.people-workspace .people-org-nav-name {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.people-workspace .people-org-nav-count {
  flex: 0 0 auto;
  margin-left: auto;
  color: var(--ink-muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.people-workspace .people-org-nav-empty {
  padding: 18px 10px;
  color: var(--ink-muted);
  font-size: 12px;
  line-height: 1.6;
  text-align: center;
}

.people-workspace .people-results-pane {
  min-width: 0;
}

.people-workspace .people-breadcrumb {
  min-height: 28px;
  margin: 0 0 10px;
}

.people-workspace .people-selection-guide {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 112px;
  margin-top: 12px;
  padding: 20px;
  border: 1px dashed var(--people-border);
  border-radius: var(--radius-md, 12px);
  background: linear-gradient(135deg, rgba(255, 253, 250, 0.92), rgba(248, 245, 239, 0.72));
}

.people-workspace .people-selection-guide-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--people-vermillion-soft);
  color: var(--vermillion);
  font-size: 20px;
}

.people-workspace .people-selection-guide-title {
  color: var(--ink-dark);
  font-size: 14px;
  font-weight: 700;
}

.people-workspace .people-selection-guide-detail {
  margin-top: 4px;
  color: var(--ink-muted);
  font-size: 12px;
  line-height: 1.5;
}

.people-workspace .people-workspace-grid.is-searching {
  display: block;
}

.people-workspace .people-workspace-grid.is-searching .people-org-rail,
.people-workspace .people-workspace-grid.is-searching .people-breadcrumb,
.people-workspace .people-workspace-grid.is-searching #orgCardArea,
.people-workspace .people-workspace-grid.is-searching #memberDisplay {
  display: none !important;
}

.people-workspace .people-workspace-grid.is-searching .search-results {
  margin-top: 0;
}

.people-workspace .person-card-name,
.people-workspace .person-card-meta,
.people-workspace .person-card-field-value,
.people-workspace .record-name,
.people-workspace .record-phone,
.people-workspace .record-field-value {
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
}

.people-workspace .person-card-name {
  overflow: visible;
  text-overflow: clip;
}

.people-workspace .person-card-meta {
  overflow: visible;
  text-overflow: clip;
}

.people-workspace .person-card-field-value,
.people-workspace .record-field-value {
  overflow: visible;
  text-overflow: clip;
}

.people-workspace .record-top {
  flex-wrap: wrap;
}

.people-workspace .person-card-title {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex-wrap: wrap;
}

.people-workspace .person-code-tag,
.people-workspace .person-runzeyuan-tag {
  flex-shrink: 0;
}

.people-workspace .record-main {
  min-width: min(180px, 100%);
}

@media (max-width: 820px) {
  .people-workspace .people-context-section {
    display: block;
  }

  .people-workspace .people-context-section .health-grid {
    width: 100%;
    margin-top: 12px;
  }

  .people-workspace .people-management-section {
    padding: 18px 14px;
  }

  .people-workspace .people-workspace-grid {
    display: block;
  }

  .people-workspace .people-org-rail {
    display: none;
  }

  .people-workspace .people-breadcrumb {
    margin-bottom: 12px;
  }

  .people-workspace .people-results-pane {
    width: 100%;
  }

  .people-workspace .people-results-toolbar {
    width: 100%;
  }

  .people-workspace .people-results-toolbar .search-field {
    flex: 1 1 100%;
    width: 100%;
    max-width: none;
  }

  .people-workspace .people-selection-guide {
    min-height: 88px;
  }
}

/* 840–1023px: keep the semester context readable beside the compact rail. */
@media (min-width: 840px) and (max-width: 1023px) {
  .people-workspace .people-context-section {
    gap: 12px;
  }

  .people-workspace .people-context-section .semester-wrap {
    flex: 1 1 240px;
    min-width: 240px;
    justify-content: flex-start;
    margin-bottom: 0;
  }

  .people-workspace .people-context-section .semester-wrap .semester-tag {
    width: 100%;
    min-width: 0;
  }

  .people-workspace .people-context-section .semester-wrap .semester-tag .label {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .people-workspace .people-context-section .semester-wrap .semester-tag .name {
    flex: 1 1 auto;
    min-width: 0;
  }

  .people-workspace .people-context-section .health-grid {
    flex: 0 1 250px;
    width: 250px;
    margin: 0;
  }

  .people-workspace .people-context-section .health-diagnostic-toolbar {
    flex: 0 0 auto;
    margin-top: 0;
  }

  .people-workspace .people-context-section .health-diagnostic-toolbar .btn {
    white-space: nowrap;
  }
}

@media (min-width: 1024px) {
  .people-workspace {
    --people-org-rail-width: clamp(320px, 28vw, 360px);
  }

  .people-workspace .people-workspace-grid {
    gap: var(--space-6, 24px);
  }
}

@media (max-width: 560px) {
  .people-workspace .page-header {
    gap: 8px;
  }

  .people-workspace .page-title {
    font-size: 22px;
  }

  .people-workspace .pending-btn {
    padding: 0 9px;
    font-size: 12px;
  }

  .people-workspace .export-csv-btn {
    width: 44px;
    height: 44px;
  }

  .people-workspace .section-header {
    gap: 8px;
  }

  .people-workspace .section-description {
    max-width: 210px;
  }

  .people-workspace .search-field {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
    padding: 8px 10px;
  }

  .people-workspace .search-field-label {
    font-size: 11px;
  }

  .people-workspace .toolbar .search-input {
    width: 100%;
    padding: 3px 0 2px;
  }

  .people-workspace .person-card-top {
    align-items: flex-start;
  }

  .people-workspace .person-card-actions {
    flex-wrap: wrap;
  }
}

@media (prefers-reduced-motion: reduce) {
  .people-workspace * {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}


/* ---- 组织节点看板与管理弹窗样式 ---- */
.people-workspace .manager-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-primary);
  margin-bottom: 8px;
}

.people-workspace .webhook-status {
  display: inline-flex;
  margin-top: 6px;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--bg-primary);
  color: var(--ink-muted);
  font-size: 10px;
}

.people-workspace .webhook-status.active {
  background: var(--color-success-soft);
  color: var(--color-success);
}

.people-workspace .push-settings-section {
  margin-bottom: 12px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-primary);
}

.people-workspace .push-settings-title {
  margin-bottom: 10px;
  color: var(--ink-dark);
  font-size: 14px;
  font-weight: 700;
}

.people-workspace .push-settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.people-workspace .push-settings-grid .form-item {
  margin-bottom: 0;
}

.people-workspace .push-settings-note {
  margin-top: 8px;
  color: var(--ink-muted);
  font-size: 11px;
  line-height: 1.55;
}

.people-workspace .push-settings-textarea {
  min-height: 72px;
  resize: vertical;
  line-height: 1.55;
}

@media (max-width: 600px) {
  .people-workspace .push-settings-grid {
    grid-template-columns: 1fr;
  }
}

/* Mobile touch targets for the people and organisation workspace.  Keep this
 * scoped to the page and below the navigation morphing breakpoint so the
 * compact and full rail layouts retain their desktop density. */
@media (max-width: 839px) {
  .people-workspace button.btn,
  .people-workspace button.ui-button,
  .people-workspace .ui-error button,
  .people-workspace .record-action,
  .people-workspace #personAutosaveRetry,
  .people-workspace .pending-btn,
  .people-workspace .export-csv-btn,
  .people-workspace .modal-close,
  .people-workspace .people-org-all {
    min-height: var(--space-12, 48px);
    min-width: var(--space-12, 48px);
  }

  .people-workspace button.btn,
  .people-workspace button.ui-button,
  .people-workspace .ui-error button,
  .people-workspace .record-action,
  .people-workspace #personAutosaveRetry {
    min-width: 44px;
    padding-block: var(--space-3, 12px);
  }

  /* Keep compact action buttons readable while allowing long labels to wrap. */
  .people-workspace .org-node-card-actions,
  .people-workspace .org-node-card-toolbar,
  .people-workspace .person-card-actions,
  .people-workspace .modal-actions,
  .people-workspace .health-diagnostic-toolbar {
    gap: var(--space-2, 8px);
  }

  .people-workspace .org-node-card-actions > button,
  .people-workspace .org-node-card-actions > details,
  .people-workspace .org-node-card-toolbar > button,
  .people-workspace .person-card-actions > button,
  .people-workspace .modal-actions > button,
  .people-workspace .health-diagnostic-toolbar > button {
    flex: 1 1 12rem;
    min-width: min(100%, 8rem);
  }

  .people-workspace .org-node-card-actions > details > summary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 8rem;
    min-height: var(--space-12, 48px);
    padding: var(--space-3, 12px) var(--space-4, 16px);
    box-sizing: border-box;
    cursor: pointer;
  }

  .people-workspace .org-node-card-toolbar {
    flex-wrap: nowrap;
    justify-content: flex-end;
  }

  .people-workspace .org-node-card-toolbar > button {
    flex: 0 1 auto;
    min-width: 44px;
    min-height: 44px;
    padding-block: var(--space-2, 8px);
  }

  /* Organisation tree: both the row and its separate disclosure caret are
   * independently usable targets. */
  .people-workspace .people-org-nav-item,
  .people-workspace .people-org-nav-caret,
  .people-workspace .people-org-nav-caret-spacer,
  .people-workspace .org-node-header {
    min-height: var(--space-12, 48px);
  }

  .people-workspace .people-org-nav-item {
    padding-block: var(--space-3, 12px);
  }

  .people-workspace .people-org-nav-caret {
    width: var(--space-12, 48px);
    min-width: var(--space-12, 48px);
    flex-basis: var(--space-12, 48px);
  }

  .people-workspace .people-org-nav-caret-spacer {
    width: var(--space-12, 48px);
    min-width: var(--space-12, 48px);
    flex-basis: var(--space-12, 48px);
  }

  .people-workspace .org-toggle {
    min-width: var(--space-12, 48px);
    min-height: var(--space-12, 48px);
  }

  .people-workspace .people-breadcrumb-item {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    padding-inline: var(--space-3, 12px);
  }

  .people-workspace .person-card-toggle {
    width: var(--space-12, 48px);
    min-width: var(--space-12, 48px);
    height: var(--space-12, 48px);
  }

  .people-workspace .person-card-top {
    align-items: flex-start;
  }

  .people-workspace .person-card-info {
    min-width: 0;
  }

  .people-workspace .person-card-title {
    flex-wrap: nowrap;
    min-width: 0;
  }

  .people-workspace .person-card-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .people-workspace .person-card-path {
    flex: 1 1 100%;
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    padding-top: var(--space-1, 4px);
    -webkit-overflow-scrolling: touch;
  }

  .people-workspace .health-card,
  .people-workspace .health-diagnostic-card,
  .people-workspace .manager-card {
    min-height: var(--space-12, 48px);
  }

  /* Forms in all people, pending, organisation, push, manager and permission
   * dialogs share a comfortable control height on touch screens. */
  .people-workspace input:not([type='hidden']):not([type='checkbox']):not([type='radio']),
  .people-workspace select,
  .people-workspace textarea,
  .people-workspace .org-select {
    min-height: var(--space-12, 48px);
  }

  .people-workspace textarea {
    min-height: 96px;
  }

  .people-workspace .check-row,
  .people-workspace .push-setting-toggle {
    display: flex;
    align-items: center;
    gap: var(--space-2, 8px);
    min-height: var(--space-12, 48px);
    margin-block: var(--space-2, 8px);
    padding: var(--space-2, 8px) var(--space-3, 12px);
    box-sizing: border-box;
    cursor: pointer;
  }

  .people-workspace .check-row input,
  .people-workspace .push-setting-toggle input,
  .people-workspace input[type='checkbox'],
  .people-workspace input[type='radio'] {
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
  }

  .people-workspace .tag .remove,
  .people-workspace .position-scope-tags .remove {
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .people-workspace .push-settings-section {
    padding: var(--space-4, 16px);
  }

  .people-workspace .webhook-test {
    width: 100%;
    white-space: normal;
  }

  .people-workspace .modal-actions {
    flex-wrap: wrap;
  }

  .people-workspace .manager-grid {
    grid-template-columns: 1fr;
  }

  .people-workspace .position-board {
    display: flex;
    flex-direction: column;
    gap: var(--space-2, 8px);
  }

  .people-workspace .position-disclosure {
    border: 1px solid var(--people-border);
    border-radius: var(--radius-sm, 8px);
    background: var(--bg-primary);
    overflow: hidden;
  }

  .people-workspace .position-disclosure > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-2, 8px);
    min-height: var(--space-12, 48px);
    padding: var(--space-3, 12px) var(--space-4, 16px);
    color: var(--ink-dark);
    background: var(--color-accent-soft);
    border: 1px solid var(--color-accent);
    border-radius: var(--radius-sm, 8px);
    cursor: pointer;
    list-style: none;
  }

  .people-workspace .position-disclosure > summary::-webkit-details-marker {
    display: none;
  }

  .people-workspace .position-disclosure > summary::after {
    content: '展开';
    color: var(--ink-muted);
    font-size: var(--font-size-xs, 12px);
    font-weight: 600;
    line-height: 1;
  }

  .people-workspace .position-disclosure[open] > summary::after {
    content: '收起';
  }

  .people-workspace .position-disclosure > .position-column {
    border: 0;
    border-top: 1px solid var(--people-border);
    border-radius: 0;
    padding: var(--space-4, 16px);
  }

  .people-workspace .org-cascade {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-3, 12px);
  }

  .people-workspace .modal-actions > .btn,
  .people-workspace .modal-actions > .ui-button {
    flex: 1 1 10rem;
    min-width: min(100%, 9rem);
  }
}

.people-workspace .org-settings-actions { display:grid; gap:var(--space-3); margin-bottom:var(--space-4); }
.people-workspace .person-card-path { min-width:0; max-width:100%; overflow-x:auto; white-space:nowrap; color:var(--ink-muted); font-size:var(--font-size-xs, 12px); }
.people-workspace #personAutosaveStatus { margin-block:var(--space-2); color:var(--ink-muted); font-size:var(--font-size-sm, 14px); }
@media (max-width:839px) {
  .people-workspace .person-card-top { align-items:center; gap:var(--space-1); flex-wrap:nowrap; }
  .people-workspace .person-card-top .person-avatar { display:none; }
  .people-workspace .person-card-title { gap:var(--space-1); }
  .people-workspace .person-card-actions { flex:0 0 auto; flex-wrap:nowrap; gap:var(--space-1); }
  .people-workspace .person-card-actions > button { flex:0 0 auto; min-width:44px; min-height:44px; height:44px; padding:var(--space-1); }
  .people-workspace .person-card-actions .person-card-toggle { width:44px; }
  .people-workspace .person-card-title .status-badge,
  .people-workspace .person-card-title .person-runzeyuan-tag,
  .people-workspace .person-card-title .person-code-tag { flex-shrink:0; padding-inline:var(--space-1); }
}

.people-workspace .org-node-card-head { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:start; gap:var(--space-2); }
.people-workspace .org-node-card-head > div:not([class]) { display:contents; }
.people-workspace .org-node-card-head .org-node-card-title { grid-column:1; grid-row:1; min-width:0; flex-wrap:wrap; font-size:var(--font-size-sm,14px); }
.people-workspace .org-node-card-head .org-node-card-toolbar { grid-column:2; grid-row:1; flex-wrap:nowrap; align-self:start; }
.people-workspace .org-node-card-meta { grid-column:1 / -1; grid-row:2; white-space:nowrap; overflow-x:auto; scrollbar-width:thin; }
.people-workspace .org-node-card-toolbar > button { font-size:var(--font-size-xs,12px); padding-inline:var(--space-2); white-space:nowrap; }

.people-workspace .person-org-summary-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:var(--space-2); }
.people-workspace .person-org-summary-grid > span { min-width:0; overflow-wrap:anywhere; }
.people-workspace .position-disclosure > summary { display:flex; width:100%; justify-content:space-between; list-style:none; }
.people-workspace .position-disclosure > summary::-webkit-details-marker { display:none; }
.people-workspace .position-disclosure > summary::after { content:"展开"; }
.people-workspace .position-disclosure[open] > summary::after { content:"收起"; }

.people-workspace .position-board { grid-template-columns:minmax(0,1fr); }

.people-workspace .position-column > .ui-button { width:100%; min-height:48px; margin-block:var(--space-2); }
.people-workspace .position-scope-tags { display:flex; flex-direction:column; gap:var(--space-2); }
.people-workspace .position-column .position-scope-tags .tag { margin:0; display:flex; width:100%; box-sizing:border-box; align-items:center; justify-content:space-between; gap:var(--space-3); min-height:48px; padding:var(--space-2) var(--space-3); font-size:var(--font-size-sm,14px); white-space:normal; overflow-wrap:anywhere; }
.people-workspace .position-column .position-scope-tags .tag .remove { flex-shrink:0; min-width:44px; min-height:44px; margin-left:auto; }
.people-workspace .person-region-context { grid-column:1 / -1; color:var(--ink-muted); font-size:var(--font-size-sm,14px); }

/* Match the warm red and gold semester summary header. */
.people-workspace .org-node-card {
  background:linear-gradient(135deg,var(--color-brand-active) 0%,var(--color-brand-hover) 58%,var(--color-accent) 145%);
  border-color:var(--color-brand-active);
  box-shadow:var(--shadow-brand);
}
.people-workspace .org-node-card .org-node-card-title,
.people-workspace .org-node-card .org-node-card-meta { color:var(--color-text-inverse, #fff); }
.people-workspace .org-node-card .status-badge { color:var(--color-brand-active); background:var(--color-accent-soft); }
.people-workspace .org-node-card-toolbar > .ui-button { border-color:var(--color-accent); background:var(--color-accent-soft); color:var(--color-brand-active); }
.people-workspace .org-node-card-toolbar > .ui-button:hover { background:var(--color-surface-card); }
.people-workspace .modal-close {
  color:var(--color-text-primary); background:var(--color-accent-soft);
  border:1px solid var(--color-accent-hover); font-weight:600; min-height:48px;
}
.people-workspace .modal-close:hover { background:var(--color-accent); }


.people-workspace .batch-io-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius-sm, 8px);
  background: var(--bg-card, #ffffff);
  border: 1px solid var(--border-color, #e5e2db);
  color: var(--ink-dark, #2b2b2b);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.people-workspace .manager-actions { display: inline-flex; gap: 6px; align-items: center; flex-shrink: 0; }
.people-workspace .manager-module-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 14px 0; }
.people-workspace .manager-module-pill { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 42px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--bg-secondary); color: var(--ink-dark); cursor: pointer; font: inherit; text-align: left; }
.people-workspace .manager-module-pill.is-on { border-color: var(--vermillion); background: var(--color-module-secretariat-soft); color: var(--vermillion); }
.people-workspace .manager-module-pill.is-disabled { opacity: .48; cursor: not-allowed; }
.people-workspace .manager-module-pill-state { font-size: 11px; color: var(--ink-muted); }
.people-workspace .manager-initial-modules { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 12px 0 0; padding: 10px; border: 1px solid var(--border); border-radius: 10px; }
.people-workspace .manager-initial-modules legend { grid-column: 1 / -1; padding: 0; }
.people-workspace .manager-initial-modules label { font-size: 13px; color: var(--ink-dark); }
.people-workspace .manager-module-help { margin: 6px 0; color: var(--ink-muted); font-size: 12px; line-height: 1.6; }
.people-workspace .batch-io-btn:hover {
  background: var(--bg-secondary, #f5f4f0);
  border-color: var(--color-accent, #c59b27);
  color: var(--color-brand-active, #8b1d1d);
}
