/* ── Crew invite form ── */

.crew-invite-form {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.crew-invite-input {
  flex: 1;
  min-width: 0;
}

/* ── Crew user list ── */

.crew-user-list {
  display: grid;
  gap: 6px;
}

.crew-user-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto auto auto;
  align-items: center;
  gap: 10px 12px;
  padding: 11px 14px;
  border: 1px solid #e8edf4;
  border-radius: 12px;
  background: #f8fafc;
}

.crew-user-row--owner {
  background: #fffdf5;
  border-color: rgba(245, 158, 11, 0.25);
  box-shadow: inset 3px 0 0 rgba(245, 158, 11, 0.55);
}

.crew-user-row--removed {
  background: #f8fafc;
  opacity: 0.7;
}

/* Avatar initial circle */
.crew-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
  background: #e2e8f0;
  color: #475569;
}

.crew-avatar--owner {
  background: rgba(245, 158, 11, 0.15);
  color: #92400e;
}

.crew-avatar--pending {
  background: rgba(14, 165, 233, 0.12);
  color: #0369a1;
}

.crew-avatar--removed {
  background: #f1f5f9;
  color: #94a3b8;
}

/* Identity */
.crew-user-identity {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.crew-user-name {
  font-size: 14px;
  font-weight: 600;
  color: #0f172a;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crew-user-email {
  font-size: 12px;
  color: #64748b;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Meta / status text */
.crew-user-meta {
  font-size: 12px;
  color: #94a3b8;
  white-space: nowrap;
}

/* Actions */
.crew-user-actions {
  display: flex;
  justify-content: flex-end;
  min-width: 48px;
}

.crew-action-btn {
  padding: 0.3rem 0.65rem;
  font-size: 12px;
}

/* Subsections (Pending / Removed) */
.crew-subsection {
  margin-top: 16px;
  display: grid;
  gap: 8px;
}

.crew-subsection-label {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #94a3b8;
}

/* ── Dark theme ── */

body.signed-in-app .crew-user-row {
  background: var(--surface-tint-subtle);
  border-color: var(--border-soft);
}

body.signed-in-app .crew-user-row--owner {
  background: rgba(245, 158, 11, 0.07);
  border-color: rgba(245, 158, 11, 0.2);
  box-shadow: inset 3px 0 0 rgba(245, 158, 11, 0.45);
}

body.signed-in-app .crew-user-row--removed {
  background: var(--surface-2);
}

body.signed-in-app .crew-avatar {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
}

body.signed-in-app .crew-avatar--owner {
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
}

body.signed-in-app .crew-avatar--pending {
  background: rgba(14, 165, 233, 0.1);
  color: #38bdf8;
}

body.signed-in-app .crew-avatar--removed {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
}

body.signed-in-app .crew-user-name {
  color: var(--text-strong);
}

body.signed-in-app .crew-user-email {
  color: var(--text-muted);
}

body.signed-in-app .crew-user-meta {
  color: var(--text-muted);
}

body.signed-in-app .crew-subsection-label {
  color: var(--text-muted);
}

body.signed-in-app .crew-action-btn {
  border-color: var(--border-input);
}
