/* Member management — extends admin.css tokens, no redesign of shell */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.members-page {
  padding: 12px 28px 36px;
}

.members-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 18px;
  align-items: start;
}

.members-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.members-search {
  position: relative;
  flex: 1 1 240px;
  min-width: 200px;
  max-width: 360px;
}

.members-search svg {
  position: absolute;
  left: 12px;
  top: 50%;
  width: 16px;
  height: 16px;
  transform: translateY(-50%);
  color: #8b93a0;
  pointer-events: none;
}

.members-search input,
.members-toolbar select,
.members-sort select,
.members-page-size select {
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  font-size: 13.5px;
  font-family: inherit;
}

.members-search input {
  width: 100%;
  padding: 0 12px 0 36px;
  outline: none;
}

.members-search input:focus,
.members-toolbar select:focus,
.members-sort select:focus,
.members-page-size select:focus {
  border-color: #c5d3ea;
  box-shadow: 0 0 0 3px rgba(47, 107, 255, 0.12);
}

.members-toolbar select {
  padding: 0 32px 0 12px;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M7 10l5 5 5-5' stroke='%238b93a0' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  min-width: 120px;
  cursor: pointer;
}

.members-filter-field {
  min-width: 120px;
}

.members-toolbar .hrzip-filter-reset {
  margin-left: 0;
  height: 40px;
}

.members-toolbar .hrzip-filter-select {
  height: 40px;
  min-width: 120px;
}

.members-toolbar__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-left: auto;
}

.btn-admin {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 40px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.03em;
  cursor: pointer;
  background: #fff;
  color: var(--text);
}

.btn-admin svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.btn-admin:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-admin--primary {
  background: var(--blue);
  color: #fff;
}

.btn-admin--primary:hover:not(:disabled) {
  background: var(--blue-deep);
}

.btn-admin--outline {
  border-color: #c9d8f3;
  color: var(--blue);
  background: #fff;
}

.btn-admin--outline:hover:not(:disabled) {
  background: #f5f8ff;
}

.btn-admin--danger {
  border-color: #f0c4c4;
  color: #d14343;
  background: #fff;
}

.btn-admin--danger:hover:not(:disabled) {
  background: #fff5f5;
}

.members-panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.members-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.members-meta {
  margin: 0;
  font-size: 13.5px;
  color: #5d6673;
}

.members-meta strong {
  color: var(--text);
  font-weight: 800;
}

.members-meta__sep {
  margin: 0 6px;
  color: #c0c7d2;
}

.members-sort select,
.members-page-size select {
  padding: 0 30px 0 10px;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M7 10l5 5 5-5' stroke='%238b93a0' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  cursor: pointer;
}

.members-table-wrap {
  overflow-x: auto;
}

.members-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  min-width: 960px;
}

.members-table th,
.members-table td {
  padding: 12px 10px;
  font-size: 13px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
  text-align: left;
}

.members-table th {
  background: #f7f9fc;
  color: #8b93a0;
  font-weight: 600;
  font-size: 12.5px;
  white-space: nowrap;
}

.members-table tbody tr:hover {
  background: #f8fafd;
}

.members-table tbody tr.is-checked {
  background: #f3f7ff;
}

.members-table .col-check {
  width: 44px;
  text-align: center;
}

.members-table .col-profile {
  width: 64px;
  text-align: center;
}

.members-table .col-name {
  width: 100px;
}

.members-table .col-id {
  width: 110px;
}

.members-table .col-email {
  width: 180px;
}

.members-table .col-role,
.members-table .col-status,
.members-table .col-cert {
  width: 78px;
  text-align: center;
}

.cert-badge {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: #eaf1ff;
  color: #2f6fed;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.cert-badge--empty {
  background: transparent;
  color: #94a3b8;
  font-weight: 600;
}

.members-toolbar__actions .owner-only[hidden],
.members-aside__actions .owner-only[hidden] {
  display: none !important;
}

.members-table .col-joined,
.members-table .col-signin {
  width: 100px;
  text-align: center;
  color: #5d6673;
  white-space: nowrap;
}

.members-table .col-manage {
  width: 148px;
  text-align: center;
}

.members-table input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--blue);
  cursor: pointer;
}

.member-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin: 0 auto;
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  background: #5b8def;
}

.member-avatar.av-1 { background: #5b8def; }
.member-avatar.av-2 { background: #6b7fd7; }
.member-avatar.av-3 { background: #3aa6a0; }
.member-avatar.av-4 { background: #e0a14a; }
.member-avatar.av-5 { background: #d46b8a; }

.members-table .col-name {
  font-weight: 700;
  letter-spacing: -0.03em;
}

.members-table .col-id,
.members-table .col-email {
  color: #5d6673;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.role-pill,
.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.role-pill--owner {
  background: #e8efff;
  color: #1f4fd8;
}

.role-pill--admin {
  background: #eef0ff;
  color: #4a56b8;
}

.role-pill--customer {
  background: #eef5ff;
  color: #3b6fd8;
}

.status-pill--active {
  background: #e8f7ee;
  color: #1f8a4c;
}

.status-pill--dormant {
  background: #fff3e6;
  color: #c26a12;
}

.row-actions {
  display: inline-flex;
  gap: 6px;
  justify-content: center;
}

.row-actions button {
  height: 30px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  color: #4b5563;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.row-actions button:hover {
  border-color: #c9d8f3;
  color: var(--blue);
  background: #f5f8ff;
}

.row-actions button.is-danger {
  color: #d14343;
  border-color: #f0c4c4;
}

.row-actions button.is-danger:hover {
  background: #fff5f5;
}

.members-table td.content-empty {
  display: table-cell;
  text-align: center;
  padding: 56px 16px;
  color: #8b93a0;
  font-weight: 600;
  border-bottom: 0;
}

.members-foot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 14px 16px 16px;
  position: relative;
}

.members-pager {
  display: flex;
  align-items: center;
  gap: 4px;
}

.members-pager button {
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #5d6673;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.members-pager button:hover:not(:disabled) {
  background: #eef2f8;
}

.members-pager button.is-on {
  background: var(--blue);
  color: #fff;
}

.members-pager button:disabled {
  opacity: 0.35;
  cursor: default;
}

.members-page-size {
  position: absolute;
  right: 16px;
}

.members-aside {
  display: grid;
  gap: 14px;
}

.members-aside__card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 16px 14px;
}

.members-aside__card h2 {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.members-aside__actions {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.members-aside__actions button {
  width: 100%;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 16px;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfcfe;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
}

.members-aside__actions button:hover:not(:disabled) {
  border-color: #c9d8f3;
  background: #f5f8ff;
}

.members-aside__actions button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.members-aside__actions .ico {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #eef3ff;
  color: var(--blue);
  display: grid;
  place-items: center;
}

.members-aside__actions .ico svg {
  width: 18px;
  height: 18px;
}

.members-aside__actions strong {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
}

.members-aside__actions em {
  display: block;
  margin-top: 2px;
  font-style: normal;
  font-size: 11.5px;
  color: var(--muted);
}

.members-aside__actions .chev {
  color: #9aa3af;
  font-size: 18px;
  line-height: 1;
}

.members-aside__actions button.is-danger .ico {
  background: #fff0f0;
  color: #d14343;
}

.members-aside__actions button.is-danger strong {
  color: #d14343;
}

.members-aside__hint {
  display: flex;
  gap: 10px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid #d7e4ff;
  background: #f3f7ff;
}

.members-aside__hint-ico {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  display: grid;
  place-items: center;
}

.members-aside__hint strong {
  display: block;
  margin-bottom: 4px;
  font-size: 13px;
  letter-spacing: -0.03em;
}

.members-aside__hint p {
  margin: 0;
  font-size: 12.5px;
  color: #5d6673;
  line-height: 1.55;
}

@media (max-width: 1180px) {
  .members-layout {
    grid-template-columns: 1fr;
  }

  .members-aside {
    grid-template-columns: 1.2fr 1fr;
  }
}

@media (max-width: 980px) {
  .members-page {
    padding-left: 16px;
    padding-right: 16px;
  }

  .members-toolbar__actions {
    margin-left: 0;
    width: 100%;
  }

  .members-aside {
    grid-template-columns: 1fr;
  }

  .members-page-size {
    position: static;
  }

  .members-foot {
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .btn-admin {
    flex: 1 1 auto;
    justify-content: center;
  }
}
/* Membership is independent from platform privileges. */
.members-table { min-width: 1350px; }
.members-table .col-tier { width: 170px; }
.tier-editor { display: flex; align-items: center; gap: 6px; }
.tier-editor select, .tier-editor button { border: 1px solid #dce2ec; border-radius: 7px; background: #fff; padding: 7px 8px; color: #344054; font: inherit; font-size: 12px; }
.tier-editor button { cursor: pointer; color: #2458e0; font-weight: 600; }
.tier-editor :disabled { opacity: .6; cursor: wait; }
.tier-staff { color: #667085; font-size: 12px; }
.members-tier-status { margin: 14px 20px; color: #667085; font-size: 12px; }
