.table {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s ease;
  overflow: hidden;
}

.table:hover {
  box-shadow: var(--shadow-md);
}

.tableHeader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  flex-wrap: wrap;
  gap: 12px;
}

.tableHeader h6 {
  font-size: 16.5px;
  font-weight: 700;
  color: var(--text-main);
  margin: 0;
  letter-spacing: -0.01em;
}

.viewAll {
  font-size: 13.8px;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--primary-light);
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.viewAll:hover {
  background: var(--primary);
  color: #ffffff;
  transform: translateX(2px);
}

.tablewrapper {
  overflow-x: auto;
  scrollbar-width: thin;
}

.table table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 0;
}

.table thead th {
  background: var(--surface-alt);
  padding: 12px 16px;
  font-size: 12.1px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  text-align: left;
  white-space: nowrap;
}

.table tbody td {
  padding: 14px 16px;
  font-size: 14.3px;
  color: var(--text-main);
  border-bottom: 1px solid var(--border);
  transition: background 0.18s ease;
  vertical-align: middle;
  white-space: nowrap;
}

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

.table tbody tr:hover td {
  background-color: var(--primary-faint);
}

/* status pills */
.status {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12.1px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  letter-spacing: 0.02em;
  line-height: 1.4;
}

#pending { background: var(--warning-light); color: var(--warning); }
#fail { background: var(--error-light); color: var(--error); }
#paid { background: var(--success-light); color: var(--success); }

/* project name cell */
.projectnames {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.projectnames h6 {
  margin: 0;
  font-weight: 700;
  font-size: 14.9px;
  color: var(--text-main);
}

.projectnames span {
  font-weight: 500;
  font-size: 12.7px;
  color: var(--text-light);
}

.projectnames b {
  color: var(--text-muted);
  font-weight: 700;
  margin-right: 2px;
}

/* action button + popover */
.action {
  position: relative;
  width: 32px;
  height: 32px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.18s ease;
  color: var(--text-muted);
}

.action:hover {
  background-color: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary-light);
}

.actionwrapper {
  position: absolute;
  background-color: var(--surface);
  z-index: 100;
  right: 0;
  top: 100%;
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  width: 160px;
  padding: 6px;
  margin-top: 8px;
  border: 1px solid var(--border);
}

.actionwrapper ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.actionwrapper ul li {
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 14.3px;
  font-weight: 500;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.18s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.actionwrapper ul li i {
  font-size: 14.3px;
  color: var(--text-light);
  transition: color 0.18s ease;
}

.actionwrapper ul li:hover {
  background-color: var(--primary-light);
  color: var(--primary);
}

.actionwrapper ul li:hover i {
  color: var(--primary);
}

.actionwrapper ul li[data-tone="danger"] {
  color: var(--error);
}
.actionwrapper ul li[data-tone="danger"] i {
  color: var(--error);
}
.actionwrapper ul li[data-tone="danger"]:hover {
  background-color: var(--error-light);
  color: var(--error);
}

/* identity cell */
.name {
  display: flex;
  align-items: center;
  gap: 12px;
}

.name img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--surface);
  box-shadow: 0 0 0 1px var(--border);
}

.name span {
  font-weight: 600;
  color: var(--text-main);
}

.empty {
  text-align: center;
  padding: 32px 16px !important;
  color: var(--text-light) !important;
  font-style: italic;
  white-space: normal !important;
}
