.am-membership-overlay {
  position: fixed;
  inset: 76px 340px 0 0;
  z-index: 40;
  overflow: auto;
  padding: 3.2rem;
  background: #f7f8fa;
  color: #182033;
  direction: rtl;
  font-family: inherit;
}

.am-membership-shell {
  max-width: 1240px;
  margin: 0 auto;
}

.am-membership-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2rem;
  align-items: end;
  margin-bottom: 2.4rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid #e5e7eb;
}

.am-eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 2.6rem;
  margin-bottom: 1rem;
  padding: 0.2rem 1rem;
  border-radius: 999px;
  background: #eef2ff;
  color: #4f46e5;
  font-size: 1.2rem;
  font-weight: 700;
}

.am-membership-header h1 {
  margin: 0 0 0.7rem;
  color: #111827;
  font-size: 2.8rem;
  font-weight: 800;
}

.am-membership-header p {
  margin: 0;
  max-width: 720px;
  color: #667085;
  font-size: 1.4rem;
  line-height: 1.9;
}

.am-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

.am-button {
  min-height: 4rem;
  padding: 0 1.4rem;
  border: 1px solid #d0d5dd;
  border-radius: 0.8rem;
  background: #fff;
  color: #344054;
  cursor: pointer;
  font-family: inherit;
  font-size: 1.3rem;
  font-weight: 700;
}

.am-button:hover {
  border-color: #9ca3af;
  background: #f9fafb;
}

.am-button-primary {
  border-color: #4f46e5;
  background: #4f46e5;
  color: #fff;
}

.am-button-primary:hover {
  background: #4338ca;
}

.am-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 1.4rem;
  margin-bottom: 2.2rem;
}

.am-stat {
  min-height: 11.2rem;
  padding: 1.8rem;
  border: 1px solid #eaecf0;
  border-radius: 1.2rem;
  background: #fff;
  box-shadow: 0 1px 3px rgba(16, 24, 40, 0.04);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.am-stat span {
  color: #667085;
  font-size: 1.25rem;
  font-weight: 700;
}

.am-stat strong {
  color: #111827;
  font-size: 3rem;
  font-weight: 800;
  line-height: 1;
}

.am-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 220px 220px;
  gap: 1.2rem;
  margin-bottom: 1.8rem;
}

.am-input,
.am-select {
  min-height: 4.6rem;
  width: 100%;
  padding: 0 1.4rem;
  border: 1px solid #d0d5dd;
  border-radius: 0.8rem;
  background: #fff;
  color: #111827;
  font-family: inherit;
  font-size: 1.35rem;
}

.am-input:focus,
.am-select:focus {
  border-color: #4f46e5;
  outline: none;
}

.am-panel {
  border: 1px solid #eaecf0;
  border-radius: 1.4rem;
  background: #fff;
  box-shadow: 0 1px 3px rgba(16, 24, 40, 0.04);
  overflow: hidden;
}

.am-table {
  width: 100%;
  overflow-x: auto;
}

.am-table table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
}

.am-table th,
.am-table td {
  padding: 1.4rem 1.2rem;
  border-bottom: 1px solid #eaecf0;
  text-align: right;
  vertical-align: top;
  font-size: 1.3rem;
}

.am-table th {
  color: #667085;
  background: #fcfcfd;
  font-weight: 800;
  white-space: nowrap;
}

.am-member-name {
  display: block;
  margin-bottom: 0.35rem;
  color: #111827;
  font-weight: 800;
}

.am-member-id {
  color: #667085;
  direction: ltr;
  text-align: right;
  font-size: 1.15rem;
}

.am-ltr {
  direction: ltr;
  text-align: right;
}

.am-badge {
  display: inline-flex;
  align-items: center;
  min-height: 2.6rem;
  padding: 0.2rem 0.8rem;
  border-radius: 999px;
  font-size: 1.15rem;
  font-weight: 800;
  white-space: nowrap;
}

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

.am-badge-pending {
  background: #fff7ed;
  color: #b45309;
}

.am-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.am-tag {
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  background: #f2f4f7;
  color: #475467;
  font-size: 1.1rem;
  font-weight: 700;
}

.am-row-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.am-row-actions a,
.am-row-actions button {
  min-height: 3.2rem;
  padding: 0 0.9rem;
  border: 1px solid #d0d5dd;
  border-radius: 0.7rem;
  background: #fff;
  color: #344054;
  cursor: pointer;
  font-family: inherit;
  font-size: 1.15rem;
  font-weight: 800;
  text-decoration: none;
}

.am-row-actions a:hover,
.am-row-actions button:hover {
  border-color: #4f46e5;
  color: #4f46e5;
}

.am-empty,
.am-loading,
.am-error {
  padding: 4rem 2rem;
  text-align: center;
  color: #667085;
  font-size: 1.4rem;
}

.am-error {
  color: #b42318;
}

.am-toast {
  position: fixed;
  left: 2.4rem;
  bottom: 2.4rem;
  z-index: 90;
  max-width: 36rem;
  padding: 1.2rem 1.5rem;
  border-radius: 1rem;
  background: #111827;
  color: #fff;
  font-size: 1.3rem;
  box-shadow: 0 14px 38px rgba(17, 24, 39, 0.18);
}

@media (max-width: 1180px) {
  .am-membership-overlay {
    inset: 76px 0 0 0;
  }
}

@media (max-width: 760px) {
  .am-membership-overlay {
    padding: 1.8rem;
  }

  .am-membership-header,
  .am-toolbar,
  .am-stats {
    grid-template-columns: 1fr;
  }

  .am-membership-header h1 {
    font-size: 2.2rem;
  }
}
