.surface {
  padding: 16px;
  margin-bottom: 14px;
}

.table-wrap {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow: auto;
  border: 1px solid rgba(60, 60, 67, 0.12);
  border-radius: 18px;
  background: var(--panel-soft);
  box-shadow: 0 12px 28px var(--shadow);
  animation: tableIn 0.32s ease both;
}

.invitation-list {
  display: grid;
  gap: 8px;
}

.invitation-card {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: var(--row-bg);
}

.invitation-copy {
  min-width: 0;
}

.invitation-copy strong,
.invitation-copy span {
  display: block;
  overflow-wrap: anywhere;
}

.invitation-copy span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.invitation-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 6px;
}

.invitation-actions button {
  min-height: 34px;
  padding-inline: 12px;
}

.compact-empty {
  min-height: 72px;
}

.compact-table table {
  min-width: 560px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 680px;
}

th,
td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line-soft);
  text-align: right;
  vertical-align: top;
}

th {
  background: var(--table-head);
  color: var(--text);
  font-size: 13px;
  position: sticky;
  top: 0;
  z-index: 1;
}

td {
  color: var(--text);
}

tbody tr {
  transition: background-color 0.16s ease, transform 0.16s ease;
}

tbody tr:hover {
  background: var(--blue-soft);
}

tr:last-child td {
  border-bottom: 0;
}

.row-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

.workspace-picker {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: min(520px, 44vw);
}

.workspace-picker input {
  width: min(220px, 20vw);
}

.workspace-picker select {
  min-width: 190px;
}

.split {
  display: grid;
  grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.setup-split {
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
}

.builder-fields {
  display: grid;
  gap: 8px;
}

.field-chip {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  background: var(--row-bg);
  animation: cardIn 0.3s ease both;
}

.field-chip strong {
  display: block;
  color: var(--ink);
}

.field-chip span {
  color: var(--muted);
  font-size: 12px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  display: grid;
  place-items: center;
  padding: 18px;
  z-index: 50;
  animation: fadeIn 0.18s ease both;
}

.modal {
  width: min(760px, 100%);
  max-height: calc(100vh - 36px);
  overflow: auto;
  background: var(--panel-strong);
  border-radius: 24px;
  box-shadow: 0 28px 80px var(--shadow-strong);
  border: 1px solid rgba(60, 60, 67, 0.16);
  animation: modalIn 0.24s ease both;
}

.modal-header {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--panel-strong);
  border-bottom: 1px solid var(--line-soft);
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.modal-header h3 {
  margin: 0;
  font-size: 18px;
}

.modal-body {
  padding: 16px;
}

.modal-footer {
  position: sticky;
  bottom: 0;
  background: var(--panel-strong);
  border-top: 1px solid var(--line-soft);
  padding: 12px 16px;
}

.required {
  color: var(--red);
}

.empty {
  min-height: 120px;
  display: grid;
  place-items: center;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: var(--row-bg);
}

.filters {
  display: grid;
  gap: 8px;
}

.filter-row {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) 110px minmax(150px, 1fr) auto;
  gap: 8px;
  align-items: center;
}
