/* ============================================================
   益善网络管理后台 - 电脑端排版规范
   仅负责展示层；业务逻辑、权限与数据流均不在本文件中处理。
   ============================================================ */

@media (min-width: 1024px) {
  .main-content .v2-page,
  .platform-page {
    width: 100%;
    box-sizing: border-box;
  }

  .platform-page {
    max-width: 1680px;
  }

  .v2-page-header {
    align-items: flex-start;
    gap: 24px;
    margin-bottom: 24px;
  }

  .v2-page-header h2 {
    font-size: 26px;
    line-height: 1.25;
    letter-spacing: -0.02em;
  }

  .platform-card > h3 {
    margin: 0 0 18px;
    font-size: 18px;
    line-height: 1.4;
    color: var(--gray-900);
  }

  .v2-table-wrap,
  .admin-table-wrap,
  .table-wrap {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    box-sizing: border-box;
    scrollbar-gutter: stable;
  }

  .v2-table {
    line-height: 1.55;
  }

  .v2-table thead th {
    padding: 14px 16px;
    vertical-align: middle;
  }

  .v2-table tbody td {
    padding: 14px 16px;
    vertical-align: middle;
  }

  .v2-table .v2-tag,
  .v2-table .platform-status,
  .v2-table .admin-status,
  .v2-table .v2-btn,
  .v2-table .admin-btn,
  .platform-actions .v2-btn,
  .desktop-table-actions .v2-btn {
    white-space: nowrap;
    word-break: keep-all;
  }

  .v2-table .v2-tag,
  .v2-table .platform-status,
  .v2-table .admin-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    box-sizing: border-box;
    line-height: 1.2;
  }

  .desktop-table-actions {
    line-height: 1;
  }

  .desktop-table-actions > .v2-btn,
  .desktop-table-actions > .admin-btn,
  .desktop-table-actions > a {
    margin: 3px 4px 3px 0;
    vertical-align: middle;
  }

  /* 任务池：优先保证标题、状态标签和操作按钮可读。 */
  .desktop-task-table {
    min-width: 1450px;
    table-layout: fixed;
  }

  .desktop-task-table .task-col-title { width: 29%; }
  .desktop-task-table .task-col-category { width: 8%; }
  .desktop-task-table .task-col-type { width: 8%; }
  .desktop-task-table .task-col-status { width: 8%; }
  .desktop-task-table .task-col-claim { width: 8%; }
  .desktop-task-table .task-col-owner { width: 8%; }
  .desktop-task-table .task-col-claimant { width: 9%; }
  .desktop-task-table .task-col-duration { width: 5%; }
  .desktop-task-table .task-col-points { width: 5%; }
  .desktop-task-table .task-col-actions { width: 12%; }

  .desktop-task-table .task-title-cell .v2-link {
    display: -webkit-box;
    overflow: hidden;
    line-height: 1.7;
    text-overflow: ellipsis;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .desktop-task-table th:nth-child(n+2),
  .desktop-task-table td:nth-child(n+2) {
    text-align: center;
  }

  .desktop-task-table td:nth-child(2),
  .desktop-task-table td:nth-child(3),
  .desktop-task-table td:nth-child(4),
  .desktop-task-table td:nth-child(5),
  .desktop-task-table td:nth-child(6),
  .desktop-task-table td:nth-child(7),
  .desktop-task-table td:nth-child(8),
  .desktop-task-table td:nth-child(9) {
    word-break: keep-all;
  }

  .desktop-task-table .task-actions-cell {
    text-align: left;
  }

  /* 社区管理：主信息、辅助信息和时间信息分层展示。 */
  .desktop-community-table {
    min-width: 1280px;
    table-layout: fixed;
  }

  .desktop-community-table .community-col-name { width: 12%; }
  .desktop-community-table .community-col-region { width: 24%; }
  .desktop-community-table .community-col-status { width: 9%; }
  .desktop-community-table .community-col-admin { width: 17%; }
  .desktop-community-table .community-col-created { width: 18%; }
  .desktop-community-table .community-col-changed { width: 9%; }
  .desktop-community-table .community-col-actions { width: 11%; }

  .desktop-community-table .community-name-cell strong,
  .desktop-community-table .community-status-cell,
  .desktop-community-table .community-changed-cell {
    white-space: nowrap;
    word-break: keep-all;
  }

  .desktop-community-table .community-region-cell {
    line-height: 1.75;
    word-break: normal;
    overflow-wrap: break-word;
  }

  .desktop-community-table .community-admin-cell .desktop-primary-text,
  .desktop-community-table .community-admin-cell small,
  .desktop-community-table .community-time-cell small > span {
    display: block;
  }

  .desktop-community-table .community-admin-cell .desktop-primary-text {
    margin-bottom: 5px;
    font-weight: 600;
    color: var(--gray-800);
  }

  .desktop-community-table .community-admin-cell small,
  .desktop-community-table .community-time-cell small,
  .desktop-community-table .community-changed-cell small {
    color: var(--gray-500);
    line-height: 1.65;
  }

  .desktop-community-table .community-actions-cell {
    text-align: left;
  }

  /* 人员与权限：标签在上、控件在下，账号列表使用完整宽度。 */
  .desktop-staff-create-card {
    padding: 24px 28px;
  }

  .desktop-staff-form {
    display: grid;
    grid-template-columns: repeat(3, minmax(180px, 1fr));
    gap: 18px 20px;
    align-items: end;
    margin-bottom: 18px;
  }

  .desktop-staff-form label {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-700);
  }

  .desktop-staff-form .form-control {
    min-width: 0;
    width: 100%;
    height: 42px;
    padding: 8px 12px;
    box-sizing: border-box;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    background: #fff;
    color: var(--gray-800);
    font: inherit;
  }

  .desktop-staff-form .form-control:focus {
    border-color: var(--brand);
    outline: 0;
    box-shadow: 0 0 0 3px rgba(139, 58, 58, 0.12);
  }

  .desktop-staff-form-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 38px;
  }

  .desktop-staff-form-actions .form-hint {
    color: var(--gray-500);
  }

  .desktop-staff-table-wrap {
    margin: 0;
  }

  .desktop-staff-table {
    width: 100%;
    min-width: 820px;
    table-layout: fixed;
  }

  .desktop-staff-table .staff-col-account { width: 22%; }
  .desktop-staff-table .staff-col-name { width: 20%; }
  .desktop-staff-table .staff-col-role { width: 22%; }
  .desktop-staff-table .staff-col-status { width: 12%; }
  .desktop-staff-table .staff-col-actions { width: 24%; }

  .desktop-staff-table th:nth-child(4),
  .desktop-staff-table td:nth-child(4) {
    text-align: center;
  }

  .desktop-staff-table td:last-child {
    text-align: left;
  }
}

@media (min-width: 1440px) {
  .desktop-staff-form {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}
